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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
joebax86
Frequent Visitor

I have my report set up to switch between 2 different measures, how do I also switch the formatting?

My report is set up so that all the visuals can switch between 2 different measures using a slicer, as one is a currency and the other not I also want the formatting to change as well. I've seen uses of calculation groups but I cant get tabular editor, additionally its being used in graphs so I can't just convert to text.  I gather that the new dynamic format feature may be able to help but not sure on the neccesary syntax. Below is how it currently works.

 

1. Built a table (Comparison scenario) as below for my 2 measure types.

joebax86_0-1695716064773.png

2.Within this table using the following measure;

Selected Comparison = MIN('Comparison Scenario'[Comparison ID])
 
3. In my main data table using the following measure ;
Dynamic Time/Value(Sum) = SWITCH('Comparison Scenario'[Selected Comparison],
                     1, [Value (Sum)],
                     2, [Time (Sum)])
 
4. On my report, "Comparison" from the above table is used as a slicer and  the "Dynamic Time/Value (Sum)" is used as the value in my visuals.
 
How would I get £ as well as K/M etc depending on size of number for value and just the K etc for time.
 
Thanks in advance
1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @joebax86 ,

 

As far as I know, measure or columns in Power BI only support one data type.
So if you create a measure by SWITCH() it only support one data dype, it doesn't support dynamic data type based on your selection.

According to your statement, I think [Value (Sum)][Time (Sum)]) are both measures. I suggest you to try Field in "What if Parameter".

vrzhoumsft_0-1695884918152.png

vrzhoumsft_1-1695884934772.png

Result is as below.

vrzhoumsft_2-1695884977236.png

vrzhoumsft_3-1695884987824.png

 

Best Regards,
Rico Zhou

 

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

1 REPLY 1
v-rzhou-msft
Community Support
Community Support

Hi @joebax86 ,

 

As far as I know, measure or columns in Power BI only support one data type.
So if you create a measure by SWITCH() it only support one data dype, it doesn't support dynamic data type based on your selection.

According to your statement, I think [Value (Sum)][Time (Sum)]) are both measures. I suggest you to try Field in "What if Parameter".

vrzhoumsft_0-1695884918152.png

vrzhoumsft_1-1695884934772.png

Result is as below.

vrzhoumsft_2-1695884977236.png

vrzhoumsft_3-1695884987824.png

 

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.