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
Pbiuserr
Post Prodigy
Post Prodigy

Calculate pie chart (values and percentage) as % of visible total

Hello,

I have a measure which count active items
Measure = Calculate ( Countrows(FactTable), Status = "Active") 
I use this as a value to distribute via categories on pie chart. It looks good, but what I want achieve

Lets assume that I have 3 groups (grp1 = 50 grp2 = 20 grp3 = 30) and grand total for certain period (08.2022) is 100

 

Then its all good, gives me good % and values, however If user interacts and select some filter from other chart(lets say only category = "Automotive") and then I got count of 50 in total and my results are
grp1 = 10 (10%),
grp2 = 20, (20%),
grp3 =20 (20%) -> like grand total is still 100%

while it suppose to be
grp1 = 10, (20%)

grp2 = 20, (40%)

grp3 = 20, (40%)

In label contenst I have only choices of "data value, percent of total", but it doesnt change the "total value" it seems

1 ACCEPTED SOLUTION
Pbiuserr
Post Prodigy
Post Prodigy

Ah.. I just realised that its just highlighted instead of filtered. So to answer my question -> just go to "format" -> edit interactions and select filter instead of highlight

View solution in original post

2 REPLIES 2
Pbiuserr
Post Prodigy
Post Prodigy

Ah.. I just realised that its just highlighted instead of filtered. So to answer my question -> just go to "format" -> edit interactions and select filter instead of highlight

amitchandak
Super User
Super User

@Pbiuserr , You can create a measure like this to get a total as 100

 

Measure = Divide( Calculate ( Countrows(Filter(FactTable, [Status] = "Active") )) ,  Calculate ( Countrows(Filter(all(FactTable), Status = "Active") ))  )

 

to change the label consider

Change Data labels
https://www.youtube.com/watch?v=un4PkoGF3YM

Dynamic Label
https://www.esbrina-ba.com/time-intelligence-dynamic-legend-in-line-charts/

 

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.