Forum Discussion
DAX for Submission KPI
Hi koyDominic ,
You can achieve this KPI of 2 points mentioned with following below steps:
1. First Create a column “Same Week Friday” with below DAX expression to calculate Friday of Same Week:
Same Week Friday = 'Delivery Times'[Delivery Timeout].[Date] - WEEKDAY('Delivery Times'[Delivery Timeout].[Date],2) + 5
2. Now Create Column “Next Week Tuesday Date” with DAX expression as below which gives us the Next Week Tuesday Date:
Next Week Tuesday = 'Delivery Times'[Delivery Timeout].[Date] - WEEKDAY('Delivery Times'[Delivery Timeout].[Date],2) + 9
3. Create a column to calculate KPI based on conditions you mentioned as below DAX expression:
KPI Value = IF(WEEKDAY('Delivery Times'[Delivery Timeout].[Date]) == 2 || WEEKDAY('Delivery Times'[Delivery Timeout].[Date]) == 3 || WEEKDAY('Delivery Times'[Delivery Timeout].[Date]) == 4,
IF('Delivery Times'[Invoice Submitted].[Date] > 'Delivery Times'[Delivery Timeout].[Date] && 'Delivery Times'[Invoice Submitted].[Date] <= 'Delivery Times'[Same Week Friday].[Date], "Compliant","Non-Compliant"),
IF('Delivery Times'[Invoice Submitted].[Date] > 'Delivery Times'[Delivery Timeout].[Date] && 'Delivery Times'[Invoice Submitted].[Date] <= 'Delivery Times'[Next Week Tuesday].[Date], "Compliant","Non-Compliant")
)
If this answer helps, please mark it as an Accepted Solution so it would help others to find the solution.
Thanks!
Inogic Professional Service Division
An expert technical extension for your techno-functional business needs
Power Platform/Dynamics 365 CRM
Drop an email at [email protected]
Service: http://www.inogic.com/services/
Power Platform/Dynamics 365 CRM Tips and Tricks: http://www.inogic.com/blog/