Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello,
I have several columns of data which old a 'PASS' 'FAIL' or 'N/A' value.
I need to count per row the total 'PASS' values within all the columns.
So for example if Row A contained 12 PASSES and 6 FAILS, the new measure would show 12.
I can't seem to get a COUNTX to work but i'm probably not doing it right.
Am I able to sum up a specific text value from multiple columns using DAX?
Solved! Go to Solution.
@Anonymous
Here we have to create measure for each column.
Pass Count =
calculate(counta( TableName(Column1)), TableName(Column1)="Pass") +
calculate(counta( TableName(Column2)), TableName(Column2)="Pass") +
calculate(counta( TableName(Column3)), TableName(Column3)="Pass") +
calculate(counta( TableName(Column4)), TableName(Column4)="Pass") +
calculate(counta( TableName(Column5)), TableName(Column5)="Pass")
Note :
Replace Tablename and column name
@Anonymous can you please share some of sample data with expected result.
Sure @Baskar see attached screenshot. I guess my post wasn't as self-explanatory as I thought :robotindifferent
@Anonymous,
You may select Unpivot Columns in Query Editor first.
https://community.powerbi.com/t5/Desktop/matrix-to-table-help/td-p/329415
@Anonymous
Here we have to create measure for each column.
Pass Count =
calculate(counta( TableName(Column1)), TableName(Column1)="Pass") +
calculate(counta( TableName(Column2)), TableName(Column2)="Pass") +
calculate(counta( TableName(Column3)), TableName(Column3)="Pass") +
calculate(counta( TableName(Column4)), TableName(Column4)="Pass") +
calculate(counta( TableName(Column5)), TableName(Column5)="Pass")
Note :
Replace Tablename and column name
Thanks @Baskar, it looks like this is summing columns, rather than rows? Each row in my dataset is an audit result,
So I actually don't care about the column totals at all, just the row totals.
Therefore I figured I would have to create a new calculated column either in DAX or M to achieve this...
@Anonymous use the same formula to create calculated column, it will resolve your problem.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
79 | |
78 | |
59 | |
36 | |
33 |
User | Count |
---|---|
94 | |
61 | |
56 | |
49 | |
41 |