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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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-fc4095ae9afd

 

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.