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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
danielec
New Member

Chart for multiple boolean columns

Hello everyone!

I have a simple form collecting a daily report of activities being accomplished.

 

Data example:

DaySubmitterActivity 1Activity 2Activity 3
1/3/2020agent1truetruefalse
1/3/2020agent2truefalsefalse
1/3/2020agent3falsetruefalse
2/3/2020agent1falsetrue

true

2/3/2020agent2falsefalsefalse
2/3/2020agent4truetruefalse

and so on...

 

I'd like to have a barchart with the count of "true" for each activity during a specified time period (single or multiple days). It would also be useful a timechart with Activity1, 2 ... and so on as series and the count of each one accomplished per day.

 

Is it possible?

 

Thanks in advance!

Daniele

 

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

Hi @danielec ,

 

As @Greg_Deckler said above, boolean can be a bit of a PITA in measures.
If you are able to convert your data to text the following measure should work fine for each activity:

 

 

_activity1qty = 
CALCULATE(
    COUNT('table'[Activity 1]),
    'table'[Activity 1] = "TRUE"
)

 

 

Once you have the three measures, stick them in a stacked column like this:

 

Stacked Column Chart - three measures all in 'Values', Day in 'Axis'Stacked Column Chart - three measures all in 'Values', Day in 'Axis'

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

3 REPLIES 3
BA_Pete
Super User
Super User

Hi @danielec ,

 

As @Greg_Deckler said above, boolean can be a bit of a PITA in measures.
If you are able to convert your data to text the following measure should work fine for each activity:

 

 

_activity1qty = 
CALCULATE(
    COUNT('table'[Activity 1]),
    'table'[Activity 1] = "TRUE"
)

 

 

Once you have the three measures, stick them in a stacked column like this:

 

Stacked Column Chart - three measures all in 'Values', Day in 'Axis'Stacked Column Chart - three measures all in 'Values', Day in 'Axis'

 

 



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Thank you all! After I transformed the field to numeric everything was easy.

 

Greg_Deckler
Community Champion
Community Champion

Yeah, I believe that COUNTA will count boolean values. Could also use COUNTROWS. Believe it or not, I often find annoying limitations with boolean things in Power BI so I tend to use 1's and 0's instead.

 



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...

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.