Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have data in this shape:
Id | metric | revenue |
1 | gross | 23 |
1 | net | 15 |
2 | gross | 45 |
2 | net | 12 |
3 | gross | 78 |
3 | net | 34 |
4 | gross | 89 |
4 | net | 25 |
What I need is the distinct numbers of Ids where gross revenue is >20 as a chart formula.
Basically this:
Count(Distinct {<[Id]={"=Sum({<metric={gross}>} revenue)>=20"} >} Id)
which doesn't work of course.
Any help would be greatly appreciated.
The first expression should work and be more performant, what was the issue with it?
This does the job using an If()-statement instead of a set expression.
Count(Distinct If(Aggr(Sum({<metric={'gross'}>} revenue), Id) > 20, Id))
But maybe there is a more performant solution inside set expression
The first expression should work and be more performant, what was the issue with it?
Not sure why you are using SUM here ...?
try this whether it works
Count(Distinct{<[revenue]={">20"}>}Id)
Now I am utterly confused.. Yes, it does work. Now! I have no clue why it didn't work yesterday.