Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hi,
I'm trying to count all rows where at least one column/value is empty.
My attempt: COUNTROWS(FILTER(tablename; (true when all values are NOT empty)))
Now my problem: How do I write this boolean expression without checking all columns?
Is there some way to iterate over all columns without having to hard-code them?
Thanks,
Ruben
Solved! Go to Solution.
@Anonymous ,
Suppose the table is like below:
Click query editor-> transform-> click on columns [Value1], [Value2] and [Value3]-> Unpivot, then the table will be transformed like below:
After apply&close, create a calculate column using dax below:
Flag = IF(CALCULATE(COUNT('Table'[Key]), ALLEXCEPT('Table', 'Table'[Key])) = 3, 1, 0)
Then create a measure to achieve the rows number:
Result = SUM('Table'[Flag]) / 3
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
Suppose the table is like below:
Click query editor-> transform-> click on columns [Value1], [Value2] and [Value3]-> Unpivot, then the table will be transformed like below:
After apply&close, create a calculate column using dax below:
Flag = IF(CALCULATE(COUNT('Table'[Key]), ALLEXCEPT('Table', 'Table'[Key])) = 3, 1, 0)
Then create a measure to achieve the rows number:
Result = SUM('Table'[Flag]) / 3
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Are you asking this because the number of columns varies ? or are you just looking for a short cut in writing the code ?
Help when you know. Ask when you don't!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!