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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
v-xinruzhu-msft
Community Support
Community Support

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
v-xinruzhu-msft
Community Support
Community Support

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
Super User
Super User

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
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.