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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

SWITCH DAX Measure Percentage Measure Format Issue

Hi Experts

 

See the following measure - i need to format the [% Within 6 Weeks] measure inside the switch to show as percentage values in the table - as opposed to 1 and 0 (ref to "D")

 

 

DAX Measure

Checkers111_0-1657613384790.png

 

1 ACCEPTED SOLUTION
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try:

 

 

Result (Switch) =

IF (

    HASONEVALUE ( DimMetricTable[KPI] ),

    SWITCH (

        SELECTEDVALUE ( DimMetricTable[KPI] ),

        "A", [Under 6 Week],

        "B", [Over 6 Week],

        "C", [Total Wait List],

        "D", FORMAT ( [% Within 6 Weeks], "Percent" ),

        "E", [Maxium Wait (in weeks)],

        "F", [Activity_],

        "G", [With D Codes],

        "H", [Without D Codes],

        BLANK ()

    )

)

 

 

Output:

vjianbolimsft_0-1657857072008.png

Note: After using FORMAT() , the type of this value will be converted to Text.

 

Best Regards,

Jianbo Li

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

2 REPLIES 2
v-jianboli-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please try:

 

 

Result (Switch) =

IF (

    HASONEVALUE ( DimMetricTable[KPI] ),

    SWITCH (

        SELECTEDVALUE ( DimMetricTable[KPI] ),

        "A", [Under 6 Week],

        "B", [Over 6 Week],

        "C", [Total Wait List],

        "D", FORMAT ( [% Within 6 Weeks], "Percent" ),

        "E", [Maxium Wait (in weeks)],

        "F", [Activity_],

        "G", [With D Codes],

        "H", [Without D Codes],

        BLANK ()

    )

)

 

 

Output:

vjianbolimsft_0-1657857072008.png

Note: After using FORMAT() , the type of this value will be converted to Text.

 

Best Regards,

Jianbo Li

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

amitchandak
Super User
Super User

@Anonymous , If you have created a measure slicer, I would advise to use filed parameters released in May 2022

 

https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...

 

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.