The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
20 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
29 | |
11 | |
11 | |
9 | |
9 |