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
imy
Helper I
Helper I

Percentages

Hello, I wonder if you can help me:  I am trying to create a bar chart with percentages. The only value in my data is a New Measure I created that counts the rows on the table.

This works well for everything, except when I try to show percentages.

Also, is there a way to make these bard wider?  Many thanks for your help!!

Here is what I have (counting rows):

Capture.JPG

1 ACCEPTED SOLUTION
kcantor
Community Champion
Community Champion

 

@imy 

Instead of relying on quick measures, build the measure you want. You have:

Tickets = COUNTROWS(WHD_Tickets)

Build one to show % Grand Total:

%Grand Total =

     VAR AllWhdTickets = CALCULATE([Tickets], ALL(Table[Status]))

Return

DIVIDE([Tickets], AllWhdTickets)

Please keep in mind that I do not know what your table is named or the column for your descriptions, you will need to put the correct data into the variable.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

19 REPLIES 19
202001AB
New Member

Hello, 

 

I'm also trying to plot percentages on a bar chart. I alredy have the perentage as a deceimal but I can't see anyway to plot them as percentages. Can anyone help?

HI @202001AB ,

 

Choose the measure or column and format it as % on menu bar.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



imy
Helper I
Helper I

Dear calebmfoster

 

Thank you for your answer but I do not have a % to grand total measure, how do I do this?

Anonymous
Not applicable

Remember the other reply I made and told you to drag your measure into values and hit the drop down menu? Do that  but drag it to tool tip instead

kcantor
Community Champion
Community Champion

 

@imy 

Instead of relying on quick measures, build the measure you want. You have:

Tickets = COUNTROWS(WHD_Tickets)

Build one to show % Grand Total:

%Grand Total =

     VAR AllWhdTickets = CALCULATE([Tickets], ALL(Table[Status]))

Return

DIVIDE([Tickets], AllWhdTickets)

Please keep in mind that I do not know what your table is named or the column for your descriptions, you will need to put the correct data into the variable.

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Many thanks! It worked

Anonymous
Not applicable

No problem, be sure to select a comment as a solution so the thread gets closed.

Anonymous
Not applicable

hi @imy 

 

Without knowing exactly what measure you are using. I would assume you could click on the measure in the field pane, then click the Modeling tab on the tool bar. Next select percentage under the format drop down list.

 

As far as the bar width goes, @MFelix  is right on the money.

 

Hope this helps!

I use this measure for many other visualizations, where I don't need them as a percentage.

On this particular chart, I need each bar to show the percentage of the total count.

Does this explain it better?

 

Imy

Anonymous
Not applicable

Ah, in that case, create your bar chart, then drag your measure to the value slot. Then click the little arrow on the side of the measure and select show value as... percent of grand total. It should break out each employee/building/part/whatever's percentage of the total tickets

 

 

Hi,

I just realise my x-axis its also in percentages. Ideally, I would like to have them in numbers and the bars in percentages. Its this possible?

This is the end resultThis is the end result

Anonymous
Not applicable

Off of the top my head, the quickest thing you could do is drag the % of grand total measure to the tool tip section, then drag the original measure from the fields pane to the value section. It will give you an outcome similar to this:

 

solution.png

That Simple! Thank you very much! Is there any way to make the bars wider and to format the % decimals?

Anonymous
Not applicable

No problem, for the decimals, go to the chart formatting menu, then click data labels>click the value decimal places and type "0".

 

For the bar width, try what @MFelix  suggested.

Hi @imy ,

 

You can format the decimals on the options of the chart - values format and define the number of decimals you want to have.

 

Rgards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi, sorry I should have mentioned this, my only value is the following measure: 

Tickets = COUNTROWS(WHD_Tickets)
MFelix
Super User
Super User

Hi @imy ,

 

What is the percentage you want to make? can you share how your measure is calculated?

 

Regarding the size of the bar if you go to the Y-axis options you can play around with the inner padding and the category width.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi my only measure in this 

Tickets = COUNTROWS(WHD_Tickets)
 
I would like to have the number of tickets and the % to the grand total.
 
many thanks!
Anonymous
Not applicable

drag that measure to both the value slot and the tooltip slot.  Select the drop down arrow on the side of the measure in the tool tip slot and click show value as>% grand total.

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.