Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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).
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |