Forum Discussion
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
- Anonymous2 years ago
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.
2 Replies
- AnonymousNot 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.