Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello team -
I'm trying to create a measure where it will count the number of items in a group only if that group contains a non zero number, including the zero. What I mean is that in this particular scenario:
I want to count all the number of items in Order ID 624 even though line number 9 is a zero. The logic would look at Order IDs, and determines if there is a non-zero number in there. On this step, 516 fails. But 624 passes. Then it just flags the Qty's as 1.
Any help would be appreciated. Thanks!
Solved! Go to Solution.
If you want a column, then perhaps something like:
Flag = VAR __max = MAXX(FILTER(ALL('Table'),[Order ID] = EARLIER([Order ID])),[Item Qty]) RETURN IF(__max>0,1,0)
If you want a column, then perhaps something like:
Flag = VAR __max = MAXX(FILTER(ALL('Table'),[Order ID] = EARLIER([Order ID])),[Item Qty]) RETURN IF(__max>0,1,0)
Sir you are absolute genius. Thank you!
I was able to make it a measure by making a new measure = sum(Flag).
User | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |