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 September 15. Request your voucher.

Reply
Anonymous
Not applicable

Using SWITCH (), is it possible to view result in % and whole number depending on the measure?

HI,

 

I use the expression SWITCH () to slice between diffrent measures. This works great, but I have one litt problem.

 

Is it possible to show result in percent and whole number depend on the measure you choose?

 

Example:

This is my switch measure:

 

switch =
IF (
HASONEFILTER ( 'Switch'[Category] );
SWITCH (
TRUE ();
VALUES ( 'Switch'[Ref] ) = 0; [measure 1];
VALUES ( 'Switch'[Ref] ) = 1; [measure 2]
)

 

The measure 1 should be shown in %, but measure 2 should be shown in whole number. How it shows now is measure 1 shows 0,58 instead of 58% and measure 2 shows ex 4395 that is right.

 

[measure1] = DIVIDE ( [# test1]; [# test2] )

[measure2] = COUNT(table[column])

 

M

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Looks like this isnt possible. 

See:

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/

 

And comments under:

 

Hi,

This is great and I was able to get it to work for my scenario. However an additional issue I have is the 2 measures I am toggling with the slicer need to display in different formats. One of the measures is a decimal to 1 decimal place. The other is a decimal to 4 decimal places. But in my table I can only see a way of setting the format of the Measure Selected to either be 1 or 4 decimal places.

I’m not sure if what I am trying to do is even possible….

Thanks for your help.

 

Answer:

Hi there,

Currently this is not possible, because as soon as you try to change the measure to change the formatting options it will then change it from a measure value to text, which means it will not aggregate.

There is an option coming soon, where you will be able to do this at a later time.

 

 

Anyone knows when this will be possible?

 

M

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Looks like this isnt possible. 

See:

https://www.fourmoo.com/2017/11/21/power-bi-using-a-slicer-to-show-different-measures/

 

And comments under:

 

Hi,

This is great and I was able to get it to work for my scenario. However an additional issue I have is the 2 measures I am toggling with the slicer need to display in different formats. One of the measures is a decimal to 1 decimal place. The other is a decimal to 4 decimal places. But in my table I can only see a way of setting the format of the Measure Selected to either be 1 or 4 decimal places.

I’m not sure if what I am trying to do is even possible….

Thanks for your help.

 

Answer:

Hi there,

Currently this is not possible, because as soon as you try to change the measure to change the formatting options it will then change it from a measure value to text, which means it will not aggregate.

There is an option coming soon, where you will be able to do this at a later time.

 

 

Anyone knows when this will be possible?

 

M

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.