UNIQUE in slice

I need a SLICE that presents me with a list of values ​​with the duplicates removed.
I'm using a simple formula: UNIQUE(LIST([Merged Doc URL - DRV]))

However, the expression must be "Yes/Not", as the appsheet alerts me: "The expression is valid but its result type 'List' is not one of the expected types: Yes/No".

I have no idea how to get this resolved.

Solved Solved
0 5 242
1 ACCEPTED SOLUTION

In case anyone is in need of something similar, I could think of a solution, and this works perfectly:

([_ROWNUMBER] = MAX(SELECT(DRV[_ROWNUMBER], ([_THISROW].[Merged Doc URL - DRV] = [Merged Doc URL - DRV]))))

View solution in original post

5 REPLIES 5

Consider whether a slice is what you really need. That’s designed to filter actual rows of a dataset, not summarize the dataset. If you do need to use a slice, you likely first need to add a column to the table with an expression that returns yes if its MERGED DOC URL - DRV value is unique among the rows whose row number is less than or equal to the current row. Then the slice filter could reference that column. 

In case anyone is in need of something similar, I could think of a solution, and this works perfectly:

([_ROWNUMBER] = MAX(SELECT(DRV[_ROWNUMBER], ([_THISROW].[Merged Doc URL - DRV] = [Merged Doc URL - DRV]))))

Thanks for this, I have been looking for something similar to this for a while.

My goal was to create a menu that I have full control of, showing the different categories of photos that have been taken.

For my reference in the future your formula is

([_ROWNUMBER] = MAX(SELECT(TABLE[_ROWNUMBER], ([_THISROW].[COLUMN TO BE UNIQUE] = [COLUMN TO BE UNIQUE]))))

This can then be put into a slice that only looks at the current users data by looking something similar to this

IF(ISBLANK(ANY(Current_User[Site Data Task Filter])), TRUE,
([_ROWNUMBER] = MAX(SELECT(Filtered Photos[_ROWNUMBER], ([_THISROW].[Photo Type] = [Photo Type])))))

Which then means I can create a menu page, that the virtual column count function works correctly (as the table is updated, rather than creating a stand alone table just for the menu) and have full control of the actions that appear, and looks something like this.

ghost5_0-1717141439488.png

 

How about

IN([Merged Doc URL - DRV],UNIQUE(TableName[Merged Doc URL - DRV]))

Perfect! That's a great tip.

Edit: Wait! That indeed looks elegant, but I don't think it would work. Every row's [Merged Doc - URL - DRV] value would be in the list of unique values from that column.

Top Labels in this Space