Forum Discussion
Clustered column chart adding percent line
Hello-
I need to add a measure to this data to calculate the % on time and then add that to a line in my clusered column chart.
The 'on time' and 'missed' categories are a new column that I created based on the data.
I am having trouble coming up with the measure to get this. Any help is appreciated.
5 Replies
- PaulDBrownCommunity Champion
Try:
% On time =
VAR TotalProjects = CALCULATE([Count of Project], ALL(Table[Category]))
VAR OnTime = CALCULATE([Count of Project], Table[Category] = "On Time")
RETURN
DIVIDE(OnTime, TotalProjects) - v-alq-msftCommunity Support
Hi, jen8080
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
You may create a measure as below.
Result = COALESCE( DIVIDE( COUNTROWS( FILTER( 'Table', [On Time*]="On Time" ) ), COUNTROWS( 'Table' ), 0 ), 0 )Then you can set 'Show secondary' on.
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- jen8080Helper I
Hi v-alq-msft,
I think this is close I have one more value though in my table 'missing complete date' where I don't yet have dates for the project. Is this easy to factor into your calculation?
I just chose to not show these on the graph but when entering your formula an error comes up.
Thanks!
- v-alq-msftCommunity Support
Hi, jen8080
Could you please show us some sample data and expected result with OneDrive for business? Do mask sensitive data before uploading. Thanks.
Best Regards
Allan