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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Dynamic measures using parameters?

I would like change my measures based on a parameter

 

for example 


measure1 = DIVIDE(income;parameter)

parameter would be the column i selected for example in a slicer or filter. So parameter = tax or parameter = revenue depends on what i selected.

Would this be possible?

Thanks in advance!


7 REPLIES 7
Anonymous
Not applicable

I didn't know that this was possible in Power BI, but if I am understanding it right, it is possible to pick a slicer, and it would affect multiple measures/visuals across a report?

 

Example – Swap Measures Using Parameters - Tableau

I was thinking of the parameters features in Tableau, and it's much less clunky. Is there a workbook example of how Power BI does it?

v-xuding-msft
Community Support
Community Support

Hi @Anonymous ,

After creating parameters, a parameter table will be created. When you use it in the formulas, it can't be used directly in measures. You still need to use the function of SWITCH to change the value. So you don't have to create parameters. As amitchandak suggested, You could just create measures using SWITCH function to implement it.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

My main purpose is to reduce the amount of measures that i have to create as i have make for example 100 measures which could maybe be reduced to 50 as it is almost the same forumula only with an other column

Hi @Anonymous ,

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @Anonymous @Anonymous ,

For your requirement, it is not good choice for reducing the amount of measures to use parameters. It will use more measures and be more complicated. Using measures is easy and quick way for the situation.

 

You could try variables to combine and improve your formulas to reduce the amount of measures.

DAX: Use variables to improve your formulas 

 

Best Regards,

Xue Ding

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I want to reduce the amount of measures that i need to create, I have two different columns which i use for almost all my measures
I thought would it be possible to make it "dynamic" or "filterable"?

So for example 

measure 1 = divide(gross ; revenue or profit)
measure 2 = divide (margin ; revenue or profit)

So i would like to just create 1 measure that divide either one of the columns profit or revenue depending on which one i choose.

woudl that be possible?

amitchandak
Super User
Super User

Refer this:

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Datanaut Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.