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
rock4sridhar
Regular Visitor

Dynamic Measure depends on slicer value

Hi,

 Need help in building a pie chart where the data is as follows,

 

col1 col2

A      150

B       500

C       200

 

when we click "A" on the slicer,the pie chart should display A (% out of 100) and remaining percentage should be B+C(%) should be displayed.can anyone help me in this scenario

2 ACCEPTED SOLUTIONS

Basic Percentage Formula = 
var Numerator = LOOKUPVALUE(Table1[Column2], Table1[Column1], SELECTEDVALUE(Table1[Column1]))
var Denominator = CALCULATE(SUM(Table1[Column2]), ALLEXCEPT(Table1, Table1[Column2]))
return
DIVIDE(Numerator, Denominator)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

Sorry for the late response,

 

If you click your visual and click Format > Edit Interactions. Some new options should appear on your visual. What you want to do is change it to HIGHLIGHTING mode.

 

highlight.png

 

Hope that helps



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

6 REPLIES 6
rock4sridhar
Regular Visitor

i am a newbie with this

Basic Percentage Formula = 
var Numerator = LOOKUPVALUE(Table1[Column2], Table1[Column1], SELECTEDVALUE(Table1[Column1]))
var Denominator = CALCULATE(SUM(Table1[Column2]), ALLEXCEPT(Table1, Table1[Column2]))
return
DIVIDE(Numerator, Denominator)


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

measure_data.pngoverview.png

Sorry for the late response,

 

If you click your visual and click Format > Edit Interactions. Some new options should appear on your visual. What you want to do is change it to HIGHLIGHTING mode.

 

highlight.png

 

Hope that helps



Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Hi i have created the table in the same name and also i have create a new measure and applied it to the pie chart..but when i choose slicer option A only A's percentage is showing in pie chart...i have added the screenshots also please can u guide me where i am going wrong

Hi i have tried the above formula but its not working 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.