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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
jaryszek
Post Patron
Post Patron

Create Variable to know if value is within table column

Hi,

 

i have table with column "Col3" and i can have there nulls or some string. 

And what i want to check if in Col3 there is everywhere "null" and put it into variable. 

 

Something like if Col3.Contains only nulls then 1 else 0. (so if 1 row is different than null - put 0). 

 

How can i do this? 
I am using Power Query, not power BI. 

Please help,
Jacek

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

You can add a custom column that references the entire column by writing #"Previous Step Name"[Col3].

if List.NonNullCount(#"Previous Step Name"[Col3]) = 0 then 1 else 1

Replace #"Previous Step Name" with the appropriate reference (e.g. it might be #"Changed Type" or Source or #"Filtered Rows").

View solution in original post

2 REPLIES 2
AlexisOlson
Super User
Super User

You can add a custom column that references the entire column by writing #"Previous Step Name"[Col3].

if List.NonNullCount(#"Previous Step Name"[Col3]) = 0 then 1 else 1

Replace #"Previous Step Name" with the appropriate reference (e.g. it might be #"Changed Type" or Source or #"Filtered Rows").

Thank you!!

 

Jacek

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors