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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
HarrisMalik
Continued Contributor
Continued Contributor

Percentage formatting for calculated measures in table visualization

Hi

 

I have a calculated measure which is formatted as percentage. When I use this measure in card visual it shows correctly the value with % sign (96.12%) but when it is used in table visual it only shows the decimal value (0.96)

 

Is it still not supported in table visual or there is a work around for this?

 

Regards

Harris

1 ACCEPTED SOLUTION

@HarrisMalik, OK, I just went back and confirmed this, I was able to put both a colum and a measure into a table (not multi-row card or card) and they both worked and had % displayed versus the decimal. Are you on the December update of Power BI? Are there any language packs involved? You could always send a frowny face to support from the Desktop and ask them what is going on. Something is definitely off because I cannot replicate your issue.

 

So, not sure if this will help, but my formula for Winning Percentage, a caculated measure is:

 

Winning Percentage = SUM([Wins]) / (SUM([Wins])+SUM([Losses])+SUM([Ties]))

 

I clicked the measure, set the % sign formatting and added it to a table and it worked fine. I can't think of anything special or tricky that I did to get it to work and I can't think of anything that you might have switched on in terms of table properties, etc. that would cause it to break like that.

 

Here are the screen shots of my setup and example of it working:

percent2.png

percent1.png



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

12 REPLIES 12
Anonymous
Not applicable

Hi,

I think your raw data has already calculated percentage, right? And it doesn't show % but decimal data. I met the same problems. 
1. Go to 

yiting_0-1664351267049.png

2. Choose the column that you wanna change the format. Firstly change the data type, then click %. 

 

Done.

ripstaur
Helper III
Helper III

So, I can see why this works. I have a different situation. I have a set of 1s and 0s (the result of a conditional column), and I am displaying the percentage of ones by a category (reporting period). So, for instance, if in the latest reporting period there were 3 ones and 1 zero, the result is 0.75. It works nicely, but I want to be able to display that 0.75 as a percentage, not a decimal. Is it possible to do that? 

pepach
New Member

even I have the same issue.  My custom measure looses formatting. Once the desktop file is closed and re-opened, the formatting is gone.

 

any pointers? thanks

 

I'm seeing the same thing for the first time too.  The only thing different for me was that I connected to an existing dataset from the Power BI service in Power BI desktop and added a couple of measures.  These are now losing format, both a currency and a percentage. 

 

Very odd! 

You should redo this in VIsualization window. (Not sure why PowerBI is not reflicting it from Dataset to Visualization)

After selecting the " Specific Column" under "Fields" pane, Modelling --> Datatype/Format.

Hope it resolves.

Anonymous
Not applicable

I have both numbers and percentage in the same column, for example:

0.21 I would like to show as 21% and 5.97 is number. I would like to represent this in graph.

I've used below,it will give you number as number, % as %.
 = if([Value]<-1,[Value],if([Value]<1,FORMAT([Value],"0.0%"),[Value]))
 
However, no further caluclation of this % will be allowed. ( error eg: PBI cannot perform simple calc such as 54.5% - 50.1%)

Anyone notice this seems to have returned in the August 2018 release?

 

We have a measure defined with a % format on a table in a data set. When we reference that measure in a matrix in a report on the same data set it shows values as %.

 

When we connect to the dataset as a PoweBI Service data source from a separate PBIX, the measure shows as a decimal.

 

For reports published using the July 2018 version, this is not occurring.....

 

Thanks!

Greg_Deckler
Super User
Super User

In Desktop, go into your model, on the Modeling tab, choose your column and click the "%" sign in Formatting area. I am guessing you used the format paintbrush in your card or a card has a different default. I use % in my tables all the time, so it is definitely supported.

 

Edit: Come to think of it, I have an example in my latest blog post Dates Prior to 1900, the first graphic shows a table where the last column is "Winning Percentage"



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler The format of the measure is already percentage having % sign selected and it shows correct percentage with sign in card or multi-row card visuals. The problem is with Table visual.

 

Refereing to your blog post, are you using table visual or multi-row card visual in your example?

@HarrisMalik, OK, I just went back and confirmed this, I was able to put both a colum and a measure into a table (not multi-row card or card) and they both worked and had % displayed versus the decimal. Are you on the December update of Power BI? Are there any language packs involved? You could always send a frowny face to support from the Desktop and ask them what is going on. Something is definitely off because I cannot replicate your issue.

 

So, not sure if this will help, but my formula for Winning Percentage, a caculated measure is:

 

Winning Percentage = SUM([Wins]) / (SUM([Wins])+SUM([Losses])+SUM([Ties]))

 

I clicked the measure, set the % sign formatting and added it to a table and it worked fine. I can't think of anything special or tricky that I did to get it to work and I can't think of anything that you might have switched on in terms of table properties, etc. that would cause it to break like that.

 

Here are the screen shots of my setup and example of it working:

percent2.png

percent1.png



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hi

 

I have exactly the same setup as you mentioned in your example. Yes I have december 2015 update. I think something is not working as expected. I will send a frowny to MS guys and see what they say.

Thanks for your time.

 

Regards

 

Harris

 

Edit: you know what, I have droped the whole table from report and recreated it, the problem solved 🙂

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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