Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Shakeerm
Helper II
Helper II

Percentage Labels into a Line & Stacked Column Chart

Hi 

I have a Line & Stacked Column Chart that illustrates the Ontime/Overdue jobs for each Job Branch

I need to show the Percentage of 100% for each Branch. 

 

When i tried to Show Value as Percent of grand total it shows the Branch Percentage for all the Branches. 

 

Task Efficiency.png

 

This is the Column that i have added to formulate Ontime/Overdue

 

Overdue.png

 

Tried a few DAX functions and none of them gave a the right results. 

Appreciate the Help

1 ACCEPTED SOLUTION
sanimesa
Post Prodigy
Post Prodigy

@Shakeerm  You may need to create a few measures for this. Here is a sample worked out - please create measures like this:

 

 

Total Count = COUNTROWS(OnTime)
OnTime Count = CALCULATE([Total Count], OnTime[Status]="ONTIME")
Overdue Count = CALCULATE([Total Count], OnTime[Status]="OVERDUE")
% OnTime = DIVIDE(OnTime[OnTime Count], [Total Count])
% Overdue = DIVIDE([Overdue Count], [Total Count])

 

 

Then set up the chart as shown in the picture below.

PBI Help ontime.PNG

View solution in original post

3 REPLIES 3
v-lili6-msft
Community Support
Community Support

HI  @Shakeerm 

Just create a measure as below:

Measure =
DIVIDE (
    CALCULATE ( COUNTA ( 'HR Performance Analysis Report'[Job No] ) ),
    CALCULATE (
        COUNTA ( 'HR Performance Analysis Report'[Job No] ),
        ALLSELECTED ( 'HR Performance Analysis Report'[Overdue] )
    )
)

 

Then drag this measure into Column values of the visual.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sanimesa
Post Prodigy
Post Prodigy

@Shakeerm  You may need to create a few measures for this. Here is a sample worked out - please create measures like this:

 

 

Total Count = COUNTROWS(OnTime)
OnTime Count = CALCULATE([Total Count], OnTime[Status]="ONTIME")
Overdue Count = CALCULATE([Total Count], OnTime[Status]="OVERDUE")
% OnTime = DIVIDE(OnTime[OnTime Count], [Total Count])
% Overdue = DIVIDE([Overdue Count], [Total Count])

 

 

Then set up the chart as shown in the picture below.

PBI Help ontime.PNG

Anonymous
Not applicable

Try this measure:

 

Pencentage Values = COUNTA(Table[Overdue]) / CALCULATE(COUNTA(Table[Overdue]),ALL(Table[Overdue]))

 

Change the data type to pecentages and you should be good to go. It's going to mess with your axis though.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.