Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
alietzau
Frequent Visitor

Having different columns show up as separate bars in a bar graph

I have a table that has columns that are boolean and I would like to count each of these columns and compare them in a bar graph. My data is structured like this:

DateUserIDColumn AColumn BColumn C
1/1/20200001TRUETRUETRUE
1/2/20200002TRUEFALSETRUE
1/3/20200003TRUETRUEFALSE
1/4/20200004FALSEFALSETRUE
1/5/20200005FALSETRUETRUE

 

I want the graph to look like this photo.

IMG_1938.jpg

It doesn't seem like it should be impossible to do, but when I try to make the graph, I just get one bar of true or false. Do I need to get a custom visualization or is this impossible?

 

2 ACCEPTED SOLUTIONS
mwegener
Most Valuable Professional
Most Valuable Professional

Hi @alietzau 

 

you could unpivot the columns with Power Query

 

You may download my PBIX file from here.
Hope this helps.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


View solution in original post

Anonymous
Not applicable

HI @alietzau ,

If you did not want to change your table structure in query editor, you can refer to following formula to create a calculated column to store expand table records from the original table, then you can use new table fields to create charts:

Table = 
SELECTCOLUMNS (
    UNION (
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column A],
            "CType", "Column A"
        ),
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column B],
            "CType", "Column B"
        ),
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column C],
            "CType", "Column C"
        )
    ),
    "Date", [Date],
    "UserID", [UserID],
    "CType", [CType],
    "CValue", [Column A]
)

Regards,

Xiaoxin Sheng

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

HI @alietzau ,

If you did not want to change your table structure in query editor, you can refer to following formula to create a calculated column to store expand table records from the original table, then you can use new table fields to create charts:

Table = 
SELECTCOLUMNS (
    UNION (
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column A],
            "CType", "Column A"
        ),
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column B],
            "CType", "Column B"
        ),
        SUMMARIZE (
            Original,
            Original[Date],
            Original[UserID],
            Original[Column C],
            "CType", "Column C"
        )
    ),
    "Date", [Date],
    "UserID", [UserID],
    "CType", [CType],
    "CValue", [Column A]
)

Regards,

Xiaoxin Sheng

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @alietzau 

 

you could unpivot the columns with Power Query

 

You may download my PBIX file from here.
Hope this helps.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors