The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello PBI community! I was wondering how I can count a distinct value on multiples column at the same time. As In the example below, I need a measure to count how many zeros (total) there are on columns, 1,2 3 (the answer should be 4):
Thnaks!
Solved! Go to Solution.
Not sure if i missed to understand, but if you need to add all the count of zeros, you can write this
Hi,
In the Query Editor, right click on the first column's heading and select "Unpivot Other Columns". Write this measure
Count = calculate(countrows(Data),Data[Value]=0)
Hope this helps.
Thank you Ashish, I wanted to avoid this step of unpivoting the columns.. Deevaker's solution below worked better for me. Thanks for replying.
You are welcome.
Not sure if i missed to understand, but if you need to add all the count of zeros, you can write this
Hi Deevaker, it worked perfectly! many thanks!
Yes you can do tyhis directly. I did not find a better solution to do it
Hi
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
80 | |
66 | |
53 | |
52 |
User | Count |
---|---|
121 | |
116 | |
77 | |
64 | |
63 |