March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all,
I have a dataset where I need to calculate and highlight jobs that has not started and has the below criteria:
- They are within 2 to 3 weeks from the [Expected Delivery Date] (EDD).
- They are within 1 week from the EDD, or doesn't have another date entered [HandIn Date]
- There are less than 80% of the [Ordered Quantity] in the [Warehouse Stock], on or after the EDD
I have tried creating a Calculated Column using DATEDIFF to subtract the EDD and TODAY() to get a number then use that to filter out my results, but no luck.
What might be other ways of getting around to do the above? I am relatively new to PowerBI, and would like to learn more about the tool. Thanks!
Julian
Solved! Go to Solution.
Hi @Julian_HH,
If I understand you correctly, you should be able to use the formulas below to add three calculate columns in your table to indicate it is Alert 1, Alert 2, and Alert 3. Then use the the three calculate columns as Slicers on your report.
IsAlert1 = IF ( Main[Expected Delivery Date] - Main[Work Start Date 1] > 21 && Main[Expected Delivery Date] - Main[Work Start Date 2] > 21, 1, 0 )
IsAlert2 = IF ( Main[Expected Delivery Date] - Main[Work Start Date 1] > 7 && Main[Expected Delivery Date] - Main[Work Start Date 2] > 7 && Main[Expected Delivery Date] - Main[HandIn Date 1] > 7 && Main[Expected Delivery Date] - Main[HandIn Date 2] > 7, 1, 0 )
IsAlert3 = IF ( ( Main[Packed Stock] + Main[Warehouse Stock] ) < Main[Order Quantity] * 0.8, 1, 0 )
Here is modified pbix file for your reference.
Regards
Hi @Julian_HH,
Could you post your table structures with some sample/dummy data and your expected result, so that we can better assist on this issue? It's better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Regards
Hi @v-ljerr-msft,
Thank you for replying, here's a link to the .pbix file. I have tried filtering out non-related columns and data, hope I didn't miss anything.
To clarify, what I would like to do is to mainly work from the "Expected Delivery Date" & "Work Start Date". The conditions I want to highlight:
- If there is no "Work Start Date" 3 weeks from the "Expected Delivery Date", then mark that as Alert 1.
- If there is no "Work Start Date" or "HandIn Date" 1 week from the "Expected Delivery Date", then mark that as Alert 2.
- If there are less than 80% of the "Ordered Quantity" in the "Packed Stock" & "Warehouse Stock" on or after the "Expected Delivery Date", then mark that as Alert 3.
I would like the result to be in a table form, so that I could use conditional formatting based on the Alerts.
Sorry if I'm not clear enough! Thanks!
Julian
Hi @Julian_HH,
If I understand you correctly, you should be able to use the formulas below to add three calculate columns in your table to indicate it is Alert 1, Alert 2, and Alert 3. Then use the the three calculate columns as Slicers on your report.
IsAlert1 = IF ( Main[Expected Delivery Date] - Main[Work Start Date 1] > 21 && Main[Expected Delivery Date] - Main[Work Start Date 2] > 21, 1, 0 )
IsAlert2 = IF ( Main[Expected Delivery Date] - Main[Work Start Date 1] > 7 && Main[Expected Delivery Date] - Main[Work Start Date 2] > 7 && Main[Expected Delivery Date] - Main[HandIn Date 1] > 7 && Main[Expected Delivery Date] - Main[HandIn Date 2] > 7, 1, 0 )
IsAlert3 = IF ( ( Main[Packed Stock] + Main[Warehouse Stock] ) < Main[Order Quantity] * 0.8, 1, 0 )
Here is modified pbix file for your reference.
Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
86 | |
73 | |
58 | |
52 |
User | Count |
---|---|
196 | |
125 | |
107 | |
68 | |
65 |