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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
1Kash_PBI
Frequent Visitor

Dynamic Formatting + Calculation Group + Slicer Using Parameter Table Pattern for Different Measure

Hello All,

 

Looking to apply some dynamic formatting to a visual that uses a calculation group to show current-year, prior-year and prior-prior-year... This visual changes measures via a slicer using a parameter table pattern (aka SWITCH function) — In the images below, when I select Retail GP I want the results to be formatted as a number, but when I select Margin I would like the results formatted as a percent.

 

Hoping the community can help me out! Thanks!

(Still new to posting here so thank you for helping me with proper naming conventions and descriptions!)

 

Sample DAX formula + Data Results: Need Margin to be a PERCENT when I select "Retail Margin" in the slicer

 

T.Retail_Measure_Table =
    SWITCH (
        [Selected Measure Retail],
        1, [INV],
        2, [Retail Sales],
        3, [Retail GP],
        4, [Retail Margin]
     )

 

GP formatted as expectedGP formatted as expectedMargin needs to be a percentMargin needs to be a percent

 

 

1 ACCEPTED SOLUTION
1 REPLY 1

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors