The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi I am still new to DAX and I feel like it should be an easy DAX to write but I tried and couldn't figure it out.
I have a chart below, I want to have a measure that counts the number of bars that is below the target, these two green bars, in this case, it should retunrs "2" as the result.
Thanks!!
Solved! Go to Solution.
Hi @Anonymous
I'm not sure where you got your target so I hard coded it to be 8.
These measures should help.
Target = 8
Shifts = SUM( 'Table'[# of Shifts] )
Below =
COUNTROWS(
FILTER(
'Table',
[Shifts] <= [Target]
)
)
Let me know if you have any questions.
Hi @Anonymous
I'm not sure where you got your target so I hard coded it to be 8.
These measures should help.
Target = 8
Shifts = SUM( 'Table'[# of Shifts] )
Below =
COUNTROWS(
FILTER(
'Table',
[Shifts] <= [Target]
)
)
Let me know if you have any questions.
User | Count |
---|---|
10 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
21 | |
14 | |
14 | |
9 | |
7 |