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.
I am trying to count all cells in a row that contain now data
I got the below code from another post looking for something similar and it works counting blanks but not null values, is there a way to count the null values also
= Table.AddColumn(#"Filtered Rows", "Count Blanks", each List.Count(List.Range(List.Select(Record.FieldValues(_), each _ = ""), 1, 100)))
Solved! Go to Solution.
Hey @PJHos
you can try the formula:
List.Count(List.Select(Record.FieldValues(_), each _ = "" or _ = null))
Hope it works for you...
Cheers, LQ
Hey @PJHos
you can try the formula:
List.Count(List.Select(Record.FieldValues(_), each _ = "" or _ = null))
Hope it works for you...
Cheers, LQ
Hey @PJHos
the following formula gives you what you want, try it and let me know 😉
List.Count(Record.FieldValues(_))-List.NonNullCount(Record.FieldValues(_))
Cheers, LQ
Hi Thank you for taking the time to help 😊
I tried the code and this does indeed count all null cells however it now no longer counts the blanks as well
would it be possible to count both null and blanks for a row?
List.Count(Record.FieldValues(_) , each _ <> null)
Try this? 🙂