Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello everyone,
I have 3 columns and I need to count the number of non blank cells in them.
I've tried to add a custom column and use the 'Count' Function but the results aren't correct.
Is there anyone who's having the same issue?
Thanks
Solved! Go to Solution.
If you want per column could create the next measure:
NBCol1 = COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL1])
If you want total:
NBTotal = (COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL1]))+(COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL2]))+(COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL3]))
Best Regards,
Miguel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , do you want total of the 3 columns or per column?
If you want per column could create the next measure:
NBCol1 = COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL1])
If you want total:
NBTotal = (COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL1]))+(COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL2]))+(COUNTROWS('BLANK')-COUNTBLANK('BLANK'[COL3]))
Best Regards,
Miguel
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
No, it doesn't work.
It gives me the sum of all the cells:
Col 1 Col 2 Col 3 RESULT Correct Results
A C 5 2
B D E 5 3
Sorry, it works: