Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
Please see table.
If Date Delivered is 14/11/2023 for Apples the deadline is <=2 days to Date Sold. How do I add a column adding on each deadline day to each category. The list is long and added to everyday. If I can get columns with the Date Delivered plus the deadline date then I should be able to work out the difference between Datedelivered/Deadline date and Date Sold. In this case it 2 days over the deadline.
Solved! Go to Solution.
Hi @lennox25
Add a measure :
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @lennox25
You can import those tables to power query and merge between them:
extract from the string of deadlines only the number of dates :
modify data type to number
And add it to the sales date with a custom column
modify a result as a date data type
uncheck the option load to the model at the deadlines table ( you don't need it inside)
Pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi @Ritaf1983 Thank you this seems to work for the over deadline.
I've now been asked to work out within deadline days - can you help withi this please?
Thanks
Hi @lennox25
Add a measure :
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Perfect - Thank you for ALL your help on this one 🙂
Hi @lennox25 ,
You can try calculated column like below:
Deadline Date =
SWITCH (
TRUE (),
'YourTable'[Category] = "Apples", 'YourTable'[Date Delivered] + 2,
'YourTable'[Category] = "Pears", 'YourTable'[Date Delivered] + 2,
'YourTable'[Category] = "Oranges", 'YourTable'[Date Delivered] + 2,
'YourTable'[Category] = "Bananas", 'YourTable'[Date Delivered] + 1,
'YourTable'[Category] = "Grapes", 'YourTable'[Date Delivered] + 8,
'YourTable'[Date Delivered]
)Days Over Deadline =
DATEDIFF ( YourTable[Date Sold], YourTable[Deadline Date], DAY )
Best Regards,
Adamk Kong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thats great and seems to work perfect - how would I now go about putting the Days Over deadline into a %?
percent from which variable?
Hi @lennox25
You can create 3 measures : "
1.
2
3
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thank you - I will take a look at the PBI report you attached and hope it works 🙂 Will let you know
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |