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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
hongho2
Frequent Visitor

checking for multiple fields

Hi, I am checking to see if the status is greater than 15, then it should be "Yes"; otherwise, it should be "No". The syntax from example #1 is working. However, I noticed that many records were blank and should fall under "No", but they didn't. So I modified the syntax as shown in example #2, but I keep getting an error. I am new to DAX, so please assist me with this.

 

#1

if(Number.FromText([#"Warehousing Orders[LineStatus]"]))>15 then "Yes" else "No"

 

#2

Column = IF(
    NOT(ISBLANK([Warehousing Orders[LineStatus]]))
    || VALUE([Warehousing Orders[LineStatus]]) > 15,
    "Yes",
    "No"
))))
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hongho2 

If you want to create the column in power query, you can add a custom column and refer to the following code

if Number.FromText([LineStatus])>15 and [LineStatus]<>null then "Yes" else "No"

If you want to create the column as a calculated column, you can refer to the following code

 

Column =
IF (
    NOT ( ISBLANK ( 'Warehousing Orders'[LineStatus] ) )
        && VALUE ( 'Warehousing Orders'[LineStatus] ) > 15,
    "Yes",
    "No"
)

Best Regards!

Yolo Zhu

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

2 REPLIES 2
Anonymous
Not applicable

Hi @hongho2 

If you want to create the column in power query, you can add a custom column and refer to the following code

if Number.FromText([LineStatus])>15 and [LineStatus]<>null then "Yes" else "No"

If you want to create the column as a calculated column, you can refer to the following code

 

Column =
IF (
    NOT ( ISBLANK ( 'Warehousing Orders'[LineStatus] ) )
        && VALUE ( 'Warehousing Orders'[LineStatus] ) > 15,
    "Yes",
    "No"
)

Best Regards!

Yolo Zhu

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

mlsx4
Memorable Member
Memorable Member

Hi @hongho2 

 

You're mixing DAX with M.

I assume you want to use M. Then, you only need to modify syntax in #1 to be like:

 

if(Number.FromText([#"Warehousing Orders[LineStatus]"]))<>null and (Number.FromText([#"Warehousing Orders[LineStatus]"]))>15 then "Yes" else "No"

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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