The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
How do I count blank values by row in a custom column with DAX?
Solved! Go to Solution.
Hi @quinncode !
You can use following DAX to create a custom column which will add blank occurences in Dogs & Cats columns.
Blank = IF(ISBLANK(Pet[Dogs]) || Pet[Dogs] = "", 1, 0)
+ IF(ISBLANK(Pet[Cats]) || Pet[Cats] = "", 1, 0)
Regards,
Hasham
@quinncode use COUNTBLANK() DAX function to get count of blank values(rows) in a column.
DOGS | CATS | BLANKS |
dog | 1 | |
cat | 1 | |
dog | cat | 0 |
Thanks, however I need a count of blanks at the row level like table above
Hi @quinncode !
You can use following DAX to create a custom column which will add blank occurences in Dogs & Cats columns.
Blank = IF(ISBLANK(Pet[Dogs]) || Pet[Dogs] = "", 1, 0)
+ IF(ISBLANK(Pet[Cats]) || Pet[Cats] = "", 1, 0)
Regards,
Hasham
Thank you! Perfect answer.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
33 | |
13 | |
12 | |
9 | |
7 |