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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create a report from a table with many binary values

Hi, 

I want to create a barchart from an order table that has 30 products stored as binary values. Example. Product A = TRUE.

 

I want to create a chart where I can see in one go the frequency of these products by yearquarter (actually values are not completely binary as they are TRUE/FALSE/BLANK). And I want to have a table visual in the same report so that when I click on the visual frequency I will see the records in the table visual. Example Product A, when I select the barchart frequency of A, I want to see Order 1 in the table visual.

 

For this I started to create measures in the Order table, that count the number of rows:

Product A = COUNTAX(FILTER(Orders; Orders[Product A]=TRUE());[Product A]), and I put the measures in the barchart. This works but this does not filter through to the table visual of course. 
 
Is there a (more efficient) way to make this work. 

 

OrderProduct AProduct BProduct CProduct DOrder date
1TRUEBLANKFALSETRUEddmmyy
2FALSETRUEBLANKTRUEddmmyy
3FALSEFALSETRUETRUEddmmyy

 

Kind regards,

 

Bram

1 ACCEPTED SOLUTION
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

After unpivoting your table, you could use matrix visual to show your data. Put product names in the "Column" option and put order numbers in the "Row" option. 

2-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

After unpivoting your table, you could use matrix visual to show your data. Put product names in the "Column" option and put order numbers in the "Row" option. 

2-1.PNG

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Greg_Deckler
Community Champion
Community Champion

Have you considered unpivoting your Product columns?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg Hi thanks for the input. Considered yes, but I will try that. I was thinking my report table visual would then also look like an unpivoted table, something that I don't want. 

 

Order 1 - Product A

Order 1 - Product D 

...

 

 

@Anonymous 

Please consider unpivot.

https://radacad.com/pivot-and-unpivot-with-power-bi

 

You can use summarize, select column and union . but not suggested

Union(
selectcolumns(table,"Order",table[Order],"Product","Product A", "Date",Table[Order date],"Value",table[Product A]),
selectcolumns(table,"Order",table[Order],"Product","Product B", "Date",Table[Order date],"Value",table[Product B]),
selectcolumns(table,"Order",table[Order],"Product","Product C", "Date",Table[Order date],"Value",table[Product C]),
selectcolumns(table,"Order",table[Order],"Product","Product D", "Date",Table[Order date],"Value",table[Product D])
)

 

Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.