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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.