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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Syndicate_Admin
Administrator
Administrator

Dynamic change of the measurement of numbers or % values with Switch or Variable

how about my friends I need your help.. I am currently working with my powerBi and would like to see if it is possible to change the value measure by selecting by segmetation.

The problem I face is that in the rebaba selection it contains data in %, and by means of switch it brings me the values in a general format and the data must be presented in the same format as this measure.... I have already tried doubling the leaves and I do not think it is a better practice. I attach the Pbix file in case you are interested in giving me a hand 😞

https://drive.google.com/file/d/1-NIbZO6FTLMvkEPA_p84fPp-cq-XbYTl/view?usp=sharing

Alexgamb20_0-1638305293087.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Syndicate_Admin , if you want to change formatting of the measure when you choose measure you have to use calculation groups using tabular editor

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

https://www.youtube.com/watch?v=vlnx7QUVYME

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

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

View solution in original post

Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Try this:

Measure = SWITCH(MAX('Tabla (2)'[KPI]),"Rebaba",SUM(Tabla[Rebaba])/ CALCULATE(SUM(Tabla[Rebaba]),ALL(Tabla)),"Volumen", SUM(Tabla[Volumen]) )

Eyelyn9_0-1638523911476.png

Eyelyn9_1-1638523922356.png

But both of these two are the same format(number ,not with %).

In case you want to display is different formats, you may try to use calculation groups, refer to:

10 ways you can use Calculation Groups in Power BI

How And When To Use Calculation Groups In Power BI

 

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Syndicate_Admin ,

 

Try this:

Measure = SWITCH(MAX('Tabla (2)'[KPI]),"Rebaba",SUM(Tabla[Rebaba])/ CALCULATE(SUM(Tabla[Rebaba]),ALL(Tabla)),"Volumen", SUM(Tabla[Volumen]) )

Eyelyn9_0-1638523911476.png

Eyelyn9_1-1638523922356.png

But both of these two are the same format(number ,not with %).

In case you want to display is different formats, you may try to use calculation groups, refer to:

10 ways you can use Calculation Groups in Power BI

How And When To Use Calculation Groups In Power BI

 

 

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

Syndicate_Admin
Administrator
Administrator

It is not what I need, in the example it has the same format for all values. I want to change between % and decimal values and then USD

amitchandak
Super User
Super User

@Syndicate_Admin , if you want to change formatting of the measure when you choose measure you have to use calculation groups using tabular editor

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

https://www.youtube.com/watch?v=vlnx7QUVYME

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors
Top Kudoed Authors