Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Dear all,
I do have a problem with my below table. I would need to generate two information:
1. Is it an "on-time" delivery, meaning "Delivery date" </= "Requested Delivery Date"? If this is true, "YES" should appear, otherwise "NO".
2. What is the difference (in days) between the "Requested Delivery date" and the "Delivery Date".
First question I have is, would you solve this in Query-Editor or at the Desktop?
Actually I think the first one should/ could be an additional column in the Query Editor, while the second one should be at the Desktop by using a specific formula...but which one? 🤔
I hope you can help me as I am stuck...
Solved! Go to Solution.
Hi,
According to your description, i think these two requirements can be easily reached by DAX.
Here is my test table:
For your issue 1, please try this calculated column:
Column = IF('Table'[Delivery Date]<='Table'[Requested Delivery Date],"Yes","No")
For your issue 2, please try this calculated column:
Column 2 = DATEDIFF('Table'[Delivery Date],'Table'[Requested Delivery Date],DAY)
The result shows:
Hope this helps.
Best Ragards,
Giotto Zhi
Hi,
According to your description, i think these two requirements can be easily reached by DAX.
Here is my test table:
For your issue 1, please try this calculated column:
Column = IF('Table'[Delivery Date]<='Table'[Requested Delivery Date],"Yes","No")
For your issue 2, please try this calculated column:
Column 2 = DATEDIFF('Table'[Delivery Date],'Table'[Requested Delivery Date],DAY)
The result shows:
Hope this helps.
Best Ragards,
Giotto Zhi
Try like
if(datediff([Requested Delivery date],[Delivery Date],Day) >0,"Yes","No")
Hi,
The first problem I just could solve on my own by using following conditional column: 😀
= Table.AddColumn(#"Replaced Errors", "Benutzerdefiniert", each if [Planned Delivery Date Customer] = null then "On Time" else if [Planned Delivery Date Customer] >= [Delivery Date] then "On Time" else "Late")