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
RoshanK
Helper II
Helper II

Smart way to switch measures (Value/Volume) for more than 10 columns

Hi, 

 

My table looks like this (plus other volume related columns):

 

RoshanK_0-1706706200496.png

I'm aiming to have all columns switch to "Value" when a user selects it.

While one apparent solution is to create a field parameter, such as "Volume/Value Period," for each column, doing so for around 10+ columns seems not optimal.

 

Is there a more efficient approach you would recommend?

 

Thanks in advance!

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

Power BI:

  1. Create Parameter: Go to the Modeling tab and create a new parameter named "Measure Type" with two options: "Value" and "Volume".

  2. Create Calculated Column or Measure: Use DAX to create calculated columns or measures that dynamically switch between "Value" and "Volume" based on the parameter selection. For example:

Switch(
SELECTEDVALUE('Parameter'[Measure Type]),
"Value", [Value Column],
"Volume", [Volume Column]
)

 

  1. Replace [Value Column] and [Volume Column] with the appropriate column names in your data model.

  2. Use Calculated Fields: Use the calculated columns or measures in your visualizations instead of the original columns. They will automatically adjust based on the selected measure type.

By following this approach, you can efficiently handle switching between "Value" and "Volume" for multiple columns without creating separate parameters for each column.

 
 
 
 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

View solution in original post

1 REPLY 1
123abc
Community Champion
Community Champion

Power BI:

  1. Create Parameter: Go to the Modeling tab and create a new parameter named "Measure Type" with two options: "Value" and "Volume".

  2. Create Calculated Column or Measure: Use DAX to create calculated columns or measures that dynamically switch between "Value" and "Volume" based on the parameter selection. For example:

Switch(
SELECTEDVALUE('Parameter'[Measure Type]),
"Value", [Value Column],
"Volume", [Volume Column]
)

 

  1. Replace [Value Column] and [Volume Column] with the appropriate column names in your data model.

  2. Use Calculated Fields: Use the calculated columns or measures in your visualizations instead of the original columns. They will automatically adjust based on the selected measure type.

By following this approach, you can efficiently handle switching between "Value" and "Volume" for multiple columns without creating separate parameters for each column.

 
 
 
 

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

 

In case there is still a problem, please feel free and explain your issue in detail, It will be my pleasure to assist you in any way I can.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.