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.
Hi,
I want to create a calculated column that counts the days between two date columns in the same table with a tolerance of +- 1 day. I am working on a performance dashboard and I want to visualize on time deliveries from a specifik vendor. If the delivery date is greater than the posting date (with a tolerance of +-1 day), the output is "Late", if the delivery date is equal or smaller than the posting date (with a tolerance of +- 1 day, the output is "On Time".
Any tips on how to achive this?
Best
Solved! Go to Solution.
Hi @Anonymous
You may try this Calculated Column or Measure.
1 Calculated Column
2 Measure
Then, the result should look like this:
Attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problems on it or I misunderstand your needs, please feel free to let us know. Thanks a lot!
Hi @Anonymous
You may try this Calculated Column or Measure.
1 Calculated Column
2 Measure
Then, the result should look like this:
Attached the pbix file as reference.
Best Regards,
Community Support Team _ Caiyun
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If you still have problems on it or I misunderstand your needs, please feel free to let us know. Thanks a lot!
Is this what you're trying to write?
Punctuality =
IF ( Table1[DeliveryDate] > Table1[PostingDate] + 1, "Late", "On Time" )
Thanks for the reply!
This is part of my table. I added column "Days between" so it will be easier to see the difference in days. So in this case "Days between" with row values of 4 is considered "Late", and the row values of 1 is considered "On Time", hence the 1 day tolerance. If the posting date is 2 days after the delivery date, it is considered "Late". Unfortunately your solution resulted in all of the rows showing "Late", but something similiar is what i'm looking for.
If you've got this column, then you should be able to write
IF ( Table1[Days Between] > 1, "Late", "On time" )
HI @Anonymous
Try this:
Measure =
Var _Dif = Table1[Primised_Receipt_Date] - Table1[Posting_date]return
If(_Dif<=1,"On Time","Late")
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi!
Thank you for replying.
Weirdly enough I get this result with Punctunality =
Var _Dif = Table1[Promised_Receipt_Date] - Table1[Posting_date]return
If(_Dif<=1,"On Time","Late")
Do those date columns have Date foramt?
Try this:
New Column=
If(([Promised_Receipt_Date] - [Posting_date])<=1,"On Time","Late")
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Unfortunately I get the same result as before. The two columns have date format
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |