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
Anonymous
Not applicable

Check if a column values is blank and simply return Yes/N

Good morning,

i looked around and i still couldn't find a solution to something so simple.


I have a colmun where some rows have values other don't.
I need to create another column that returns Yes if there's a value, No if there's not

I tried :
if(isblank[columnName]),"True","False")
if(isblank[columnName]),true,false)

And .. no luck
Thanks for any help

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

I have built a simple data sample(column is Text type), please check.

  • Use DAX:
Column use DAX = IF([Fonction]<>BLANK(),TRUE(),FALSE())   // or IF([Fonction]<>BLANK(),"Yes","No")

if value is blank-DAX.PNG

  • In Power Query:
TrueOrFalse = Text.Length([Fonction])>0

Or 

YesOrNo = if Text.Length([Fonction])>0 then "Yes" else "No"

if value in blank -In Power Query.PNG

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @Anonymous ,

 

I have built a simple data sample(column is Text type), please check.

  • Use DAX:
Column use DAX = IF([Fonction]<>BLANK(),TRUE(),FALSE())   // or IF([Fonction]<>BLANK(),"Yes","No")

if value is blank-DAX.PNG

  • In Power Query:
TrueOrFalse = Text.Length([Fonction])>0

Or 

YesOrNo = if Text.Length([Fonction])>0 then "Yes" else "No"

if value in blank -In Power Query.PNG

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thanks for the quick reply 🙂
I'm still gettting an error

dhurtubise_0-1627461103075.png

 

Thank you for your feedback.

What I wrote is for calculated column, written in DAX.

 

Are you looking for M in Power Query?

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

To be honest i'm just looking for a way to have the data as yes or No lol
I thought i simple Conditionnal Column would do it but no....

Jihwan_Kim
Super User
Super User

Please try the below.

 

Another column CC =
IF ( ISBLANK ( 'tablename'[columnName] ), "No", "Yes" )

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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!

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 Solution Authors
Top Kudoed Authors