Forum Discussion

Stefaan-4365's avatar
Stefaan-4365
New Member
6 years ago
Solved

Bar chart with true/false ratio

Hello

I have a table with three columns true/false, let's call them isTested, isDeployed, and isAccepted. From these columns I need to create a bar chart that shows each of these columns in two colors representing the true/false ratio. This turns out to be much harder than I expected, and any help would be greatly appreciated!

Thank you
Stefaan

  • parry2k's avatar
    parry2k
    6 years ago

    @Stefaan-4365 as @Greg_Deckler suggests, rip the table and it can be done easily with the following steps:

    - Click transform data

    - Add index column from the menu

    - select the index column, right-click and choose de-

    you will get two columns, attribute and value, rename these columns as you want to call them.

    Close and apply:

    in the visual bar chart, place Attribute on the X axis, the value of the legend and count rows in the values section, and you'll get the expected results.

    I'd like to❀ Complimentsif my solution helped me.πŸ‘‰If you can spend time posting the question, you can also make efforts to give Kudos who has helped solve your problem. It's a token of appreciation!

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    So generally you would unpivot those three columns in Power Query and then things become much easier.

    • parry2k's avatar
      parry2k
      Icon for Super User rankSuper User

      @Stefaan-4365 as @Greg_Deckler suggests, rip the table and it can be done easily with the following steps:

      - Click transform data

      - Add index column from the menu

      - select the index column, right-click and choose de-

      you will get two columns, attribute and value, rename these columns as you want to call them.

      Close and apply:

      in the visual bar chart, place Attribute on the X axis, the value of the legend and count rows in the values section, and you'll get the expected results.

      I'd like to❀ Complimentsif my solution helped me.πŸ‘‰If you can spend time posting the question, you can also make efforts to give Kudos who has helped solve your problem. It's a token of appreciation!