This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
I have a table with 12 columns of true/false data. I need to be able to present the number of true values per column. Though I was able to get this done my process is not repeatable nor is it elegant. The process I took was to duplicate the table, group by one of the columns, unpivot the table, filter on True values. Repeat for all 12 rows creating 12 new tables. I then used a append query to combine the 12 tables into a single table. Since doing it this way, I cannot get rid of the 12 new tables because they are referenced by the combined table. I was hoping someone had some ideas on how to do this with DAX.
Original Table
| Q1 | Q2 | Q3 | Q4 |
True | True | False | Null |
| False | True | True | True |
| Null | False | True | True |
Duplicated, Group by Table
| Q1 | Count |
| null | 1 |
| False | 1 |
| True | 1 |
Unpivoted
| Count | Attribute | Value |
| 1 | Q1 | False |
| 1 | Q1 | True |
Filtered
| Count | Attribute | Value |
| 1 | Q1 | True |
Solved! Go to Solution.
you can try to unpivot all colums.
Then group by attribute and value columns
Proud to be a Super User!
What I ended up doing was to copy the table, delete all of the rows that I didn't need, unpivoted the table and that gave me what I needed. I kept an ID field so that I could relate it to the original table.
Thank you for helping and offering suggestions.
I will give these ideas a try, thank you.
Hi @boyddt_mn ,
If you want to use DAX to count it, you can unpivot all the columns in power query first, close and apply it.
Create a measure like this to count:
Count =
CALCULATE (
COUNTROWS ( 'Table' ),
FILTER (
ALL ( 'Table' ),
'Table'[Attribute]
IN DISTINCT ( 'Table'[Attribute] )
&& 'Table'[Value] = TRUE ()
)
)
Attached a sample file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
you can try to unpivot all colums.
Then group by attribute and value columns
Proud to be a Super User!
Check out the May 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 29 | |
| 27 | |
| 25 | |
| 19 | |
| 14 |
| User | Count |
|---|---|
| 56 | |
| 48 | |
| 37 | |
| 21 | |
| 20 |