Forum Discussion

1Kash_PBI's avatar
1Kash_PBI
Frequent Visitor
5 years ago
Solved

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 expectedMargin needs to be a percent