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 August 31st. Request your voucher.

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
amitchandak
Super User
Super User

@1Kash_PBI , Not very clear.

Check if these article can help

https://www.youtube.com/watch?v=vlnx7QUVYME
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

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

1 REPLY 1
amitchandak
Super User
Super User

@1Kash_PBI , Not very clear.

Check if these article can help

https://www.youtube.com/watch?v=vlnx7QUVYME
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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