This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreDid you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now
I have a table with US states in Column A and then 10 columns headed with different animals. I have a "y" in the table if that animal is found in that state, how do I create a new column/measure to count how many "y"'s for each state (row) please??
Solved! Go to Solution.
Thanks, I get erros when I enter the code (likely my error as totally new to DAX/coding...). I used a COUNTIFS formula in the Excel source file instead in the end which achieved the same goal.
That's fine. If you have skills in Excel that's the place to solve an issue.
In Power Query, you could add a column using List.Select(, for example,
List.Select({[Column1],[Column2],[Column3]}, each _ = "y"))
and you can wrap that with a List.Count to count the "y"'s
----
However, the most flexible solution would probably be to Unpivot all the Animal columns (in Power Query) and write a single DAX measure using COUNT.
Thanks, I get erros when I enter the code (likely my error as totally new to DAX/coding...). I used a COUNTIFS formula in the Excel source file instead in the end which achieved the same goal.
Check out the April 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 |
|---|---|
| 36 | |
| 33 | |
| 31 | |
| 21 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 55 | |
| 31 | |
| 24 | |
| 23 |