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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ehartanto
Frequent Visitor

Multiple Number Format in the Same Column

Hello, 

 

I am having difficulty having multiple number formats in the same column. I had it in the same column for drilling down and filtering purposes from different entities. For example, here is my data. I wanted occupancy rate, % margin to show in percentage whereas rental rate and margin to be in numerical form with one decimal place. Is there any way I could achieve this?

Metric                  Amount
Occupancy           0.8

Rental Rate          60.1

Margin                 20.6
% Margin             0.2

 

Thanks in advance!

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@ehartanto 

You can create a measure with multiple format.

Measure = SWITCH(MAX('Table'[Metric]),
"Occupancy",FORMAT(SUM('Table'[Amount]),"Percent"),
"% Margin", FORMAT(SUM('Table'[Amount]),"Percent"),
SUM('Table'[Amount]))

mult formate measure.JPG


Paul Zheng _ Community Support Team
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

5 REPLIES 5
V-pazhen-msft
Community Support
Community Support

@ehartanto 

You can create a measure with multiple format.

Measure = SWITCH(MAX('Table'[Metric]),
"Occupancy",FORMAT(SUM('Table'[Amount]),"Percent"),
"% Margin", FORMAT(SUM('Table'[Amount]),"Percent"),
SUM('Table'[Amount]))

mult formate measure.JPG


Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This is exactly what I needed and it's a simple solution. Thanks!!

amitchandak
Super User
Super User

@ehartanto , In that case, you have to return the number from a column in the given format. It might become a text column use format function.  refer various format here -https://docs.microsoft.com/en-us/power-bi/desktop-custom-format-strings

 

A few days back I have seen a video from Guyincube where they used external tools for formatting for measure slicer. Not sure that can work for you.

https://www.youtube.com/watch?v=vlnx7QUVYME

Greg_Deckler
Super User
Super User

@ehartanto Tough one. If it is OK to convert to text, you can use FORMAT to achieve this.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

apology if i hijacked this thread. I've managed to do this and happy to share my one. $,%, and many others. got one dynamic columns that dynamically took place for my more than 15 measures.

 

the one that i can't get around is the Style Icon. like for:

sales - use bar icons

percentage - use arrows growth icons.

and many more.. totally stucked with this :)... any tip? if i have to create my own external.. what research i need?

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.