cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

1 ACCEPTED SOLUTION
Community Support

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.

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

4 REPLIES 4
Super User
Helper IV

Thanks @amitchandak

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

Conversationnal Worthiness 62.00%

..

Likeability 7.0

Recognition 42.00%

Thanks

D.

Community Support

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.

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

Helper IV

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.

Announcements

#### New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

#### Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

#### Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors