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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

IF STATEMENT

I wonder why this does not work:

Laedays_0-1629129545802.png

 

Status 2 = IF('DailyASCPPlan Data'[ORDER_TYPE_TEXT] = "Planned order demand" && ISBLANK('DailyASCPPlan Data'[PROJECT_NUMBER]),"Planned","Ordered")

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , This is column can you show in the table view?

 

Also, check if PROJECT_NUMBER is text, check is it a empty string ""

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

6 REPLIES 6
goncalogeraldes
Super User
Super User

Try this one: 

 

 

Status 2 = 
var order_type = SELECTEDVALUE('DailyASCPPlan Data'[ORDER_TYPE_TEXT])
var is_blank = ISBLANK('DailyASCPPlan Data'[PROJECT_NUMBER])

return
IF( order_type = "Planned order demand" && is_blank,
      "Planned",
      "Ordered")

 

 

Nevertheless, it may be best to create a "Calculated Column" or a "Custom column" in Power Query.

Hope this answer solves your problem! If you need any additional help please tag me in your reply.
If my reply provided you with a solution, pleased mark it as a solution ✔️ or give it a kudoe 👍
Thanks!

Best regards,
Gonçalo Geraldes

 

Anonymous
Not applicable

Thank you so much. I appreciate your help. This actually works. Tho i just found out that the actual value is not really blank, rather a "". so i did not use isblank and rather evaluate if field = "".

selimovd
Super User
Super User

Hey @Anonymous ,

 

it looks like it works, but I guess you expected a different result 😉

 

In Power BI you can add a calculated column, that's just a new column in the table. A calculated table is calculated when the file is loaded and then fix. The value won't change based on slicers.

Or you can use a measure. A measure always needs a context and is calculated based on this context.

 

Based on your formula I guess you used a calculated column.

In your screenshot you used a matrix, so rows might be hidden based on your selection.

 

To see if all of your values are existing, go to the Data tab and check the result in the complete table there:

selimovd_0-1629129914644.png

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

Anonymous
Not applicable

@selimovd Thank you so much. I appreciate your help. This actually works. Tho i just found out that the actual value is not really blank, rather a "". so i did not use isblank and rather evaluate if field = "".

amitchandak
Super User
Super User

@Anonymous , This is column can you show in the table view?

 

Also, check if PROJECT_NUMBER is text, check is it a empty string ""

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Right. It's "" not blank. thanks for the info!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.