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

Using a slicer to change revenue dynamically within a measure

Hi guys,

 

I want to know if it is possible to have a value measure where it will essentially be "Measure = Divide([Salary],[Revenue],0)"

 

But I want to be able to change the Revenue #'s dynamically?

 

For example, Revenue = Income A + Income B.

 

I want to be able use a slicer or something similar, where I can click on "Income A" and the graph will change to show Salary/Income A and if i press Income B it will be Salary/Income B.

 

Currently I have 2 separate graphs. I want to know if it's possible to just put it into one graph. 

 

Thank you. 

 

 

1 ACCEPTED SOLUTION
quentin_vigne
Solution Sage
Solution Sage

Hi @xxjq88

 

I've done something similar using this tutorial : http://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Measures-Titles-Using-SWITCH/td-p/200...

 

Use switch function so that your graph display the measure wanted

It takes a little bit of time but It's worth it

 

- Quentin

View solution in original post

5 REPLIES 5
quentin_vigne
Solution Sage
Solution Sage

Hi @xxjq88

 

I've done something similar using this tutorial : http://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Measures-Titles-Using-SWITCH/td-p/200...

 

Use switch function so that your graph display the measure wanted

It takes a little bit of time but It's worth it

 

- Quentin

Hi Quentin,

 

Just need a little bit of help. 

 

I've created the following measure:

 

"SelectedMeasure = IF(HASONEVALUE(IncomeMeasureTbl[MeasureName]),SWITCH(VALUES(IncomeMeasureTbl[MeasureName]),"Teaching Income",DIVIDE([ExpTotalSalary],[RevTeachingIncome],0),"Other Income",DIVIDE([ExpTotalSalary],[RevOtherIncome],0)))"

 

and created the table to store the names - "Teaching Income" & "Other Income".

 

But it doesn't seem to work. 

 

Any tips?

 

Thank you in advance

 

 

nevermind. i figured it out. thanks for your help!

Hi Quentin, thank you for the tutorial. I'll give this a try!

Hardik
Continued Contributor
Continued Contributor

You can do this using a treemap 

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.