Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
Hi dear Community,
In Power BI (Desktop)
I have 20 columns with numbers and and I need to count them if they match with a value (i.e. count if the column's value = 0)
I need to create a new column with this count
Any advice how I can calculate it, since the countif function (for columns) does not exist in Power Bi
I appreciate your help
Carlos G.
With Query Editor, We can add a custom Column like
List.Count(List.Select(Record.ToList(_),each _ =0))
Thanks a lot for your help..
It worked, but I would like to understand it better.
Could you try to explain it in a few words?...pleaseee... I appreciate it
Thanks a lot
Carlos G.
Hi Zubair,
Actually, I would like to know how I can specify a contigous range of columns in order to apply this "count if"...
How I can do it?
Below the 3 columns that I need to apply this "Count If"
You could use IF Functions in Power Query Including Nested IF for these three columns
https://www.computergaga.com/blog/if-functions-in-power-query-including-nested-ifs/
For example:
if [Column1]" and [Column2] and [Column3] then <Your expected outrput> else <Your other output>
Regards,
Lin
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
61 | |
61 | |
55 | |
38 | |
27 |
User | Count |
---|---|
85 | |
60 | |
45 | |
41 | |
39 |