Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
WayneC
Regular Visitor

List.NonNullCount returning 1 rather than 0

Is there any reason why this would return an answer of 1 when all columns counted are null ?

example: (foreman.1.2 is column 8 when referencing the formula below):

 

WayneC_0-1681925445340.png

 

results:

WayneC_1-1681925445542.png

 

formula:

"Count_Foreman", each List.NonNullCount(List.Range(Record.FieldValues(_),8,4)))

 

This returns the correct number for all "NonNull" counts, but when all four columns are null, it returns "1" every time.

2 ACCEPTED SOLUTIONS
m_dekorte
Super User
Super User

Hi @WayneC,

 

Break out the List.Range part and validate what it returns.

For example this code below returns: { 7, 8 }

 

List.Range( {1..10}, 6, 2 )

 

 

I hope this is helpful

View solution in original post

Thanks.. Goes back to simple de-bugging by command.   Turns out first column is ref = 0, so the column ref in my formula should be 7,4 not 8,4... thank you.

View solution in original post

3 REPLIES 3
m_dekorte
Super User
Super User

Hi @WayneC,

 

Break out the List.Range part and validate what it returns.

For example this code below returns: { 7, 8 }

 

List.Range( {1..10}, 6, 2 )

 

 

I hope this is helpful

Thanks.. Goes back to simple de-bugging by command.   Turns out first column is ref = 0, so the column ref in my formula should be 7,4 not 8,4... thank you.

@WayneC  It would be awesome if you tagged the response that helped you solve your query as Solution, thanks!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors