Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Date | Code | ID | key |
2022-05-01 | A | 1 | A1 |
2022-02-01 | A | 2 | A2 |
2022-02-01 | B | 1 | B1 |
2022-02-01 | B | 1 | B1 |
Hello,
How to find (count) key only A1 or A2 or both. How to not count B1?
I can count (key) = 4 or count (distinct key) = 3 but I need 2 ( just A values). Off course key value can be different.
So the logic is: "Count all keys that don't have duplicates"?
Then you can use
Count({<key={"=Count(key)=1"}>} key)
Count({<key-={B1}>} key)
Yes, but B1 Is example - it will be different values
Hello,
@Henric_Cronström is right! To elaborate further in the solution, here is the expressions on some test data:
1. Loaded all the data and added one extra row for B1 to see clearly the difference
2. Used the following expressions:
3. Outcome is:
As you can see it counts all the needed values properly.
I hope that this information was helpful.
Yes, you right but how to count without knowing the values?
@jacek_k Could you please be more clear with your requirement? The above methods should yield you the required output. Or provide us some sample data?
I edit my post. The idea is count values except values where are the same (B1). Of course key will be different so I can not use -= .
So the logic is: "Count all keys that don't have duplicates"?
Then you can use
Count({<key={"=Count(key)=1"}>} key)