yaxx0r
yaxx0r

Reputation: 149

Power BI - Bar chart with one bar per logical column in table

I have a table of things, and multiple true/false columns of attributes for that thing.

enter image description here

I want to make a bar chart with one bar for each attribute, and the value being a count of Thing IDs where the attribute is TRUE:

enter image description here

I'm sure it's simple but I'm having trouble, and I'd appreciate any help.

Upvotes: 0

Views: 1068

Answers (1)

xris23
xris23

Reputation: 353

In the Power Query editor, you can pivot the columns of the attributes. Select the attribute columns and click on tab transform on Pivot column.

you will get: ThingID | Attribute | Value

then you can add a conditional column to count the TRUE. If value equals TRUE then 1 else 0

Then make a chart in PowerBI and your Axis is the Attribute column and the Values is your count column and your there.

Upvotes: 2

Related Questions