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
Jayfemi
Helper I
Helper I

Percentage Data Labels for Line and Stacked Column Chart

Hi i have got a Line and Stacked Column Chart and when i select data labels i am given the sum for each segment in the chart. Ideally instead of the sum i would like the percentage of that segment to only be visible over the Sum.

 

is this possible or can this be added as a tooltip instead?

 

capture.JPG

 

1 ACCEPTED SOLUTION

Hi @Jayfemi,

If my understanding is right, you can create several measures using the formulas.

NewCompleted = SUM(Data[Completed])/SUM(Data[Allocated])
NewFollow = SUM(Data[FollowOn])/SUM(Data[Allocated])
NewNoAccess = SUM(Data[NoAccess])/SUM(Data[Allocated])
NewNoAction = SUM(Data[NoAction])/SUM(Data[Allocated])


Add the measures as value levels, you will get the following result, please review and download the pbix file.

3.png

Best Regards,
Angelia

View solution in original post

8 REPLIES 8
v-huizhn-msft
Employee
Employee

Hi @Jayfemi,

Please create a measure using the formula below, and add the measure as value level.

Percentage=sum(Table[value])/CALCULATE(SUM(Table[value]),ALL(Table))


If this still does not resolve your issue, please share your sample table and list expected result.

Best Regards,
Angelia

This solution for me is parsing the percentage across the entire chart instead of breaking based on x-axis categories. Is this the intention and/or is it possible to get it to break down by the x-axis categories? For instance in my chart I break it down by group, and am needing to look at what percentage each group has for stories that are completed vs not. 

Example of data:
Table <Monthly Totals>


<Month><Area><Category><NumValue>
Jan JK  Stories Completed 8

Jan JK  Not on Time 2

Jan JR  Stories Completed 6

Jan JR  Not on Time 1

Feb JK  Stories Completed 30

Feb JK  Not on Time 1

Feb  JR  Stories Completed 15

Feb JR  Not on Time 1

Hi Angela,

 

I hope this finds you well, thank you very much for your time i really appreciate it. The fomula does solve one of my problems it is now but getting it to show up on the visual.

 

i used the formula as like this treating the Allocated as the total so on the visual instead of seeing the sum of completed jobs i'd like to see that as a percentage of the allocated jobs.

 

CJP Percentage = sum(Data[Completed])/CALCULATE(SUM(Data[Allocated]),ALl(Data))

Hi Angela,

 

please see link cotaining my PBIX file and excel sheet that i am working from

 

https://www.dropbox.com/s/waxp8oqx0d805r9/Percentage%20Data%20Labels%20for%20Line%20and%20Stacked%20...

Hi @Jayfemi,

If my understanding is right, you can create several measures using the formulas.

NewCompleted = SUM(Data[Completed])/SUM(Data[Allocated])
NewFollow = SUM(Data[FollowOn])/SUM(Data[Allocated])
NewNoAccess = SUM(Data[NoAccess])/SUM(Data[Allocated])
NewNoAction = SUM(Data[NoAction])/SUM(Data[Allocated])


Add the measures as value levels, you will get the following result, please review and download the pbix file.

3.png

Best Regards,
Angelia

Spoiler
 

hi @v-huizhn-msft 

 

 

thanks for that i really appreicate the time spent on this.

 

i am trying to access the Pbix file that you uploaded but i can't seem to locate it.

 

Capture 04 08.JPG

Hi @Jayfemi,

I upload it to OneDrive, the following is the shared link, please click and download it.

https://1drv.ms/u/s!Av62M_jYbMcegQsSD2CnW3jwdBZb

Best Regards,
Aneglia

Hi @v-huizhn-msft 

 

i believe this will work i am having trouble accessing the file you uploaded when i extract it i cant fine the pbix file.Capture 04 08.JPG

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.

Top Solution Authors