Hi,
I’m new to Appsheet and would like to know how to count unique rows in a table. I want to do a Showif on a table view only if there are more than 2 rows to show. If there is only 1 row than go straight to that record.
For example in the Showif on the view I have the expression: COUNT(PlayerDrillSets[DrillSetName])>1
The table consists of something like this: DrillID DrillSetName 1
U14 D4 2
U14 D4
For the count function the documentation states: COUNT(Customers[Phone Number])
— returns the count of “unique” phone numbers contained in the Phone Number field of the Customers table.
I would expect my expression to be false (=1) because count would only return one unique row, instead it returns a count of 2. There are no spaces or other characters in the DrillSetName.
Am I going about the counting of unique rows the wrong way?
Appreciate any thoughts on this.
Thanks in advance.
OK, so the text in the expressions documentation is referring to unique simply because they are phone numbers not because count has unique set by default. So I am using this expression to get unique values:
COUNT(select(PlayerDrillSets[DrillSetName],true,true))>1
Just checking if that’s the best/simplest way.
Thanks List Expressions and Aggregates help.appsheet.com
You approach is a good one
Thanks Aleksi… appreciated.
User | Count |
---|---|
39 | |
28 | |
23 | |
23 | |
13 |