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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Switch returning percentage and whole numbers

Hi,

I have a switch statement which returns both the total number of enquiries and sales as well as a percentage that divides e.g. enquiries created with total number of transactions.

The way it is now, the supposed percentage value returns 0.01 and not 1.00%.

Is there any workaround regarding this?

I have set each of the measures created to either decimal or whole number and the percentage measures to % with 2 decimals but it takes the whole/decimal number. 

 

Kind regards,

Jari

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , In measure and column tool you have % icon , press that you should get %

 

Data Format New Rib.png

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
Anonymous
Not applicable

That is already used for each measure.

JariL_0-1618471205848.png

The first 3 statements return whole numbers such as 100 000 while the 3 others return 0.01 when I want it to return 1.00%. Each measure is already configured under formatting but it doesn't reflect it when it is used in the visuals. I don't want % for all measures

Anonymous
Not applicable

@Anonymous 

 

Mixing different outputs in one measure is never a good idea. If you really need to do it, then you've got 2 choices: return the result as text formatted the way you want or use calculation groups. The first choice is simple but such a measure will have to be a top-level measure (meaning you won't be able to use it correctly in other measures). The second choice is more complex but it's the preferred way as it allows the measure to be used in other measures as it'll return the type it should (not only text).

@Anonymous , this can best be done with calculation groups( I think you are using measure slicer

 

calculation groups

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

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.