Return first found row in Slice

I am struggling with a row filter for a Slice. I want to return the rows with unique Customer IDs AND Week Number. For example, my data might have multiple rows for the same Customer ID and Week Number. I want to return only one row (can be the first or last, doesnโ€™t matter) per same Customer ID and Week Number.

[_ROWNUMBER] = MAX(SELECT(Jobs[_ROWNUMBER], AND(([Customer ID] = [_THISROW].[Customer ID]), ([Week Number] = [_THISROW].[Week Number]))))

0 4 192
4 REPLIES 4

Hi,

Try with:

[Keyid]=unique(SELECT(Jobs[keyid], AND(([Customer ID] = [_THISROW].[Customer ID]), ([Week Number] = [_THISROW].[Week Number]))))

Iโ€™m using Job ID (text and numbers), which is Key for this table and I get error:

Cannot compare Text with List in ([Job ID] = UNIQUE(SELECT(Jobs[Job ID],AND(([Customer ID] = [_THISROW].[Customer ID]), ([Week Number] = [_THISROW].[Week Number])))))

try replacing UNIQUE with ANY

That worked! thank you.

Top Labels in this Space