Forum Discussion

imy's avatar
imy
Helper I
7 years ago
Solved

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):

  •  

    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.

     

19 Replies

  • 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

    • imy's avatar
      imy
      Helper I

      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's avatar
        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.

  • Anonymous's avatar
    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!

    • imy's avatar
      imy
      Helper I

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

      Tickets = COUNTROWS(WHD_Tickets)
    • imy's avatar
      imy
      Helper I

      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's avatar
        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

         

         

  • Dear calebmfoster

     

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

    • kcantor's avatar
      kcantor
      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.

       

    • Anonymous's avatar
      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

  • 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?

    • MFelix's avatar
      MFelix
      Super User

      HI 202001AB ,

       

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