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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vashu-123
Frequent Visitor

Need help with calculated column dax

Hello All. I am using the below dax for my calculated column and it is created with out any errors but, the entire column is blank after the dax.

Column = SWITCH(
IF(CONTAINS(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "ITW"),"Inbound", " "),
IF(CONTAINS(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "DTW"), "Delivered to WH", " "),
IF(CONTAINS(inbound_inventory_test,inbound_inventory_test[PO_Confirmation_Date], " "), "not confirmed", " "),
 
IF(CONTAINS(inbound_inventory_test,inbound_inventory_test[manufacturer_name], "zones"), "Zones Service", " "),
IF(value(inbound_inventory_test[PO_Confirmation_Date])>TODAY()-3, "New PO", " "),
IF(value(inbound_inventory_test[PO_Confirmation_Date])<TODAY()-30,"30+days Open", "Inbound"),
"inbound")


vashu123_0-1670233732023.png

 

Any idea where am i going wrong or is my dax incorrect? Any help would be much appreciated. Thanks in Advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@vashu-123 , Try like

 

Column = SWITCH( True() ,
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "ITW"),"Inbound",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "DTW"), "Delivered to WH",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[PO_Confirmation_Date], " "), "not confirmed",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[manufacturer_name], "zones"), "Zones Service",
(inbound_inventory_test[PO_Confirmation_Date])>TODAY()-3, "New PO",
(inbound_inventory_test[PO_Confirmation_Date])<TODAY()-30,"30+days Open",
"Inbound")

View solution in original post

2 REPLIES 2
v-xiaosun-msft
Community Support
Community Support

Hi @vashu-123 ,

 

Has your problem be solved? If solved, please mark the answer which helps above as a solution. If not, please tell us in order that we can help you further more.

 

Best Regards,
Community Support Team _ xiaosun

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

amitchandak
Super User
Super User

@vashu-123 , Try like

 

Column = SWITCH( True() ,
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "ITW"),"Inbound",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[ETS_Mgmt_Follow_up_Comments], "DTW"), "Delivered to WH",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[PO_Confirmation_Date], " "), "not confirmed",
CONTAINSSTRING(inbound_inventory_test,inbound_inventory_test[manufacturer_name], "zones"), "Zones Service",
(inbound_inventory_test[PO_Confirmation_Date])>TODAY()-3, "New PO",
(inbound_inventory_test[PO_Confirmation_Date])<TODAY()-30,"30+days Open",
"Inbound")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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