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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
jondarcy
New Member

Create a rule to show If a column contains text or not

Hi All

 

I have created a report in desktop and I want to add a column (Column B) to show if the column next to it (Column A) contains text or not and return a yes/no response. I tried isblank and a conditional column, but I can't get the right result.

 

Thanks in advance

1 ACCEPTED SOLUTION

@jondarcy 

You posted this question under Power Query, so I provided a PQ solution. It seems you need to add a column to your table using DAX, Go to you table, and add a new column 

Fowmy_0-1705585717244.png


Add this code:

Check Blank = IF(  OR( ISBLANK([Column A])  , [Column A]="") , "Yes" , "No" )




 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@jondarcy 

Try
= if [Column A]=null or [Column A]="" then "Yes" else "No"



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thank you, I tried that and still can't get it to work. I'm clicking Modeling>New Measure then:

1. Column B=

2.= if [Column A]=null or [Column A]="" then "Yes" else "No"

@jondarcy 

You posted this question under Power Query, so I provided a PQ solution. It seems you need to add a column to your table using DAX, Go to you table, and add a new column 

Fowmy_0-1705585717244.png


Add this code:

Check Blank = IF(  OR( ISBLANK([Column A])  , [Column A]="") , "Yes" , "No" )




 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Brilliant, thank you 

Einomi
Helper V
Helper V

Hi @jondarcy 

 

Please can you be more specific and let us know how your data looks like and the desired outcome. You are welcome to attach screenshots

 

Looking forward

Screenshot_20240118_094854_Microsoft 365 (Office).jpg

  • I'm trying to do something similar to the above in PowerBI. I have a column, some rows have text, some don't and I just want to add a column to identify the rows which do/don't have text in them by returning a Yes/No response

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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