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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ADP007
Helper IV
Helper IV

Format number in matrix

Hi,

 

Is it possible to format a number as a percentage or a whole number in a matrix depending on a value?

In the example below I would like the 7.00% for Likeability to be a whole number so 7.00 without the percentage.

The measure is formatted a percentage.

 

Thanks

 

2021-09-28_16-31-50.jpg

1 ACCEPTED SOLUTION

Hi @ADP007 

Power BI column or measure could be formatted in one data type. So if you format your OOH measure as Percentage data type, all values from this measure will show in Percentage. You can try if function to achieve your goal. New measure will be formatted as text type.

Try this measure.

New_OOH = 
SWITCH(TRUE(),MAX('Table'[KPI]) = "Likeability",FORMAT([OOH]*100,"#.00"),FORMAT([OOH],"#.00%"))

Result is as below.

1.png

Best Regards,
Rico Zhou

 

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

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@ADP007 , refer if this blog on a similar topic can help

https://radacad.com/dynamically-change-the-format-of-values-in-power-bi

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thanks @amitchandak 

 

The issue here is that I want some vaues to be a percetage and some to be a whole number

Brand Linkage 56.00%

Conversationnal Worthiness 62.00%

..

Likeability 7.0

Recognition 42.00%

 

Thanks

D.

Hi @ADP007 

Power BI column or measure could be formatted in one data type. So if you format your OOH measure as Percentage data type, all values from this measure will show in Percentage. You can try if function to achieve your goal. New measure will be formatted as text type.

Try this measure.

New_OOH = 
SWITCH(TRUE(),MAX('Table'[KPI]) = "Likeability",FORMAT([OOH]*100,"#.00"),FORMAT([OOH],"#.00%"))

Result is as below.

1.png

Best Regards,
Rico Zhou

 

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

Thanks a lot @v-rzhou-msft 

 

This will do the job as t's only for presenting figures. No totals, drill down etc...

 

Many thanks

D.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.