Forum Discussion
alvin199
4 years agoHelper III
Question on Calculate Percentage
I have a sample data like this in table called Worker.
I would like to create a DAX to calculate percentage of people in each station and then plot it into a bar chart.
The DAX I am using is
Percentage of people =
CALCULATE(
COUNTROWs('Worker'),
ALL(
'Worker'['Station']
)
)/
COUNTROWS('Worker')
When I drag the Percentage of people measure to the line chart with Station on the X-axis, it will display the percentage over 100% in each bar. What is the mistake on my DAX?
Hi alvin199
Please try thisColumn = CALCULATE(COUNT('Table'[Station]),ALL('Table'[Station]))/COUNT('Table'[Station])
Calculate % not greater than 100% DAXIf you have any question, please let me know.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
1 Reply
- PijushRoyCommunity Champion
Hi alvin199
Please try thisColumn = CALCULATE(COUNT('Table'[Station]),ALL('Table'[Station]))/COUNT('Table'[Station])
Calculate % not greater than 100% DAXIf you have any question, please let me know.
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos