How to remove duplicates when we use filter in appsheet

Hi all, create a template to export the file, but i have many double keys in the list. Now i want to remove the double key and make my report easier the look at. I use Filter function in my report, what is the best way to filter the duplicates away in my case?

Thanks in advance!

JOHNN_0-1652107748806.png

 

0 4 489
4 REPLIES 4

I don't know what your expression looks like but generally speaking you can simply wrap your expression with the UNIQUE() function to get a single list of unique values.

https://help.appsheet.com/en/articles/3416532-unique

 

it mean i use function in template like that

 

Filter("data",[warehouse]=[_thisrow].[warehouse])

 

.But in my warehouse have many items have the same product_id, but i wanna show only one product_id for one line, like

Product 1

Product 2

not

Produc1

Produc1

Produc1

.....

Here is what you can try..

You need a table containing a list of unique values. In your case it should contain two rows - SC-BM75 and SC-6061B.

Lets call the table T1 and in the below template example, I am assuming that the values are in the key col.

Now to create a report which contains values summed up around those unique 'keys' you create a template like this.

Here I am calling the table containing all the values T2.

<<START:T1[T1 key col]>>
<<[T1 key col]>> : <<SUM(SELECT(T2[weight col],[T2 col containing the key]=[_THISROW-1].[T1 key col]))>>
<<END>>

This should produce an output with two lines.

 SC-BM75  : 11,600

SC-6061B : 4100

@TeeSee1 's format is correct. 

The only thing I would point out is that in the START expression you need to get the list of unique Product keys from the "data" table...some Products may not have any entries in the "data" table so you won't want those included.  And because you need Product keys and not the "data" table key, you cannot use the FILTER function - which returns row keys for the source table.

NOTE: I assume that the "data" table has a Product column that is of REF type.

So...START expression needs to be something like this:

<<START: UNIQUE(SELECT(data[Product], [warehouse] = [_thisrow].[warehouse]))>>
...
<<END>>

 Now, you will have you list of Product keys derived from the "data" table and can apply the SUM() functions, as suggested by @TeeSee1 , to compute the Product specific values in the rest of the template table.

Top Labels in this Space