Forum Discussion

Pamiko's avatar
Pamiko
Regular Visitor
1 year ago
Solved

Almost new to PowerBI - How to create Column chart using text data, but I would like to see %...

Hi All,

 

I am creating a report for a challange about remote work. There are 5 kind of answers based on desired home-work and added a chart:

Could you please help, what kind of DAX (or anything else) I should use, if I would like to see %s compared to all (so finally it will be 100%) instead of numbers?

 

Thank you in advance!

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Pamiko ,
    I hope the suggested solution worked for you. If your issue is resolved, kindly accept the post as a solution β€” it helps the community identify helpful answers more easily.
    Thank you.

6 Replies

  • Hello Pamiko ,

     

    The easisest way to achieve that is to create a measure

    Total Percentage =
    VAR Num = SUM('Table'[Count])
    VAR Den = CALCULATE(SUM('Table'[Count]),ALLSELECTED('Table'))
    RETURN
    DIVIDE(
        Num,Den,0)
     
    You just have to Replace Table, by the name of the table you are using and count by the right name of your count
    Then, in a chart, you add Remote working pref as X-Axis and Your measure as Y-axis
     
    And to get the value in percentage, you click on your measure in the data pane
    and in the ribbon in Measure tools, you select the % icon

     

     

    Do not hesitate to ask if you need more help πŸ™‚

  • Ashish_Excel's avatar
    Ashish_Excel
    Solution Supplier

    Hi,

    This measure pattern should work

    Measure = divide([total],calculate([total],all(Data[Reason])))

    Reason is the column which has been dragged to the X-axis.  Total is the measure you have written which you have dragged to the Y axis.

    To receive specific help, share the download link of the PBI file.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pamiko ,

    Thank you Ashish_Excel and Cookistador  for providing detailed and accurate information, really appreciate your input!

    The answer shared addresses the question well. If you are still experiencing any issues or have additional questions, please don’t hesitate to reach out. We are here to help!

    Thanks again for your cooperation and engagement in the community.

    Regards,
    pallavi G.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pamiko ,
    Following up to check whether you got a chance to review the suggestion given on creating column chart using text data.If it helps,consider accepting it as solution,it will be helpful for other members of the community who have similar problems as yours to solve it faster. Glad to help.
    Thank you.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Pamiko ,
    I hope the suggested solution worked for you. If your issue is resolved, kindly accept the post as a solution β€” it helps the community identify helpful answers more easily.
    Thank you.

  • HI Pamiko 

     

    If you are new to Power BI i would suggest you leverage UI on Power BI for this task, instead of tweaking the calculated measures, which may lead to confusions. 

     

    I used one simple simulated dataset generated by AI, after drag and drop the 'Text' column onto bar chart, turn on the data label, ideally it will show the numbers of different categories like that on your picture. On Y-axis setting, right-click the item and show the value as Percent of Grand total. This will help you adjust the chart to Percentage view. 

     

     

    Thanks 

    Mason