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,
I have a Customer Data with Customer Names..
we have some calculations, like if the product for a particular customer is dispatched on or before 7 days then we have to display "ONTIME" or else "DELAYED" this is for all the customers..
But for one specific customer, if the product is delivered on or before 3 days then we have to display "ONTIME" or else "DELAYED"..
Im Done with the dispatched calculation, but i want to know how we can vary that specific customer,(where the selection of customers is on a SLICER). the Dispatching calculations are displayed in Cards..
Please give me a Solution ASAP.
Thanks & Regards,
Krish.
Solved! Go to Solution.
Hi @Anonymous
Could you please specify the details of your request ? it’s preferred that upload your file to Onedrive and share us the link here.
Kindly note that masking your confidential info is very important! We’d like to provide the further supports afterwards.
Best regards,
Dina Ye
Hi @Anonymous
I use your sample and add the measure X and Y as below, then generate the final measure :
MeasureX = DATEDIFF(MAX([PO Date]),MAX([Commercial Doc Sub Date(CDSD)]),DAY) MeasureY = IF(MAX([New Delivery Date(NDD)])=BLANK(),DATEDIFF(MAX(Table1[PO Date]),MAX(Table1[Delivery Date(DD)]),DAY),DATEDIFF(MAX(Table1[PO Date]),MAX(Table1[New Delivery Date(NDD)]),DAY)) Measure = IF(MAX([Customer Name])="C",IF([MeasureX]>3||[MeasureY]>3,"Delayed","Ontime"),IF([MeasureX]>7||[MeasureY]>7,"Delayed","Ontime"))
Pbix here for your reference: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/Eb7qbUrP9DZLuru04lJ2Ps4BFhroClWwEiVOrV-LFn903w?e=YAzzgH
Best regards,
Dina Ye
Hi @Anonymous
Could you please specify the details of your request ? it’s preferred that upload your file to Onedrive and share us the link here.
Kindly note that masking your confidential info is very important! We’d like to provide the further supports afterwards.
Best regards,
Dina Ye
Hi,
Please find the data..
i already calculated X and Y..
so i need to display if we select Cutomer C then the X and Y values has to be changed...
| ID | Customer Name | Product | Delivery Date(DD) | Commercial Doc Sub Date(CDSD) | PO Date | New Delivery Date(NDD) | X = CDSD - PODATE | Y = DD/ NDD - PO Date | X Outcome | Y Outcome |
| 1 | A | Spoon | 20-06-19 | 22-06-19 | 16-06-19 | 22-06-19 | ||||
| 2 | A | Mug | 21-06-19 | 23-06-19 | 17-06-19 | 23-06-19 | ||||
| 3 | A | Shirts | 22-06-19 | 24-06-19 | 18-06-19 | 24-06-19 | ||||
| 4 | C | Jeans | 23-06-19 | 25-06-19 | 19-06-19 | |||||
| 5 | C | T Shirt | 24-06-19 | 26-06-19 | 20-06-19 | |||||
| 6 | B | Spoon | 25-06-19 | 27-06-19 | 21-06-19 | |||||
| 7 | B | Mug | 26-06-19 | 28-06-19 | 22-06-19 | |||||
| 8 | C | Shirts | 27-06-19 | 29-06-19 | 23-06-19 | 29-06-19 | ||||
| 9 | C | Jeans | 28-06-19 | 30-06-19 | 24-06-19 | 30-06-19 | ||||
| 10 | B | T Shirt | 29-06-19 | 01-07-19 | 25-06-19 | 01-07-19 | ||||
| 11 | C | Spoon | 30-06-19 | 02-07-19 | 26-06-19 | |||||
| 12 | A | Mug | 01-07-19 | 03-07-19 | 27-06-19 | |||||
| 13 | C | Shirts | 02-07-19 | 04-07-19 | 28-06-19 | |||||
| 14 | A | Jeans | 03-07-19 | 05-07-19 | 29-06-19 | 05-07-19 | ||||
| 15 | B | T Shirt | 04-07-19 | 06-07-19 | 30-06-19 | |||||
| 16 | D | Mug | 05-07-19 | 07-07-19 | 01-07-19 | 07-07-19 | ||||
| 17 | D | Shirts | 06-07-19 | 08-07-19 | 02-07-19 | 08-07-19 | ||||
| X or Y | ||||||||||
| 0( ≤ 7 days is on time, is applicable for all customer ) | On time | But for Customer C if the X or Y is <=3, then Ontime | ||||||||
| 0(>8 days is on time, is applicable for all customer ) | Delayed | But for Customer C if the X or Y is >3, then Delayed | ||||||||
Hi @Anonymous
I use your sample and add the measure X and Y as below, then generate the final measure :
MeasureX = DATEDIFF(MAX([PO Date]),MAX([Commercial Doc Sub Date(CDSD)]),DAY) MeasureY = IF(MAX([New Delivery Date(NDD)])=BLANK(),DATEDIFF(MAX(Table1[PO Date]),MAX(Table1[Delivery Date(DD)]),DAY),DATEDIFF(MAX(Table1[PO Date]),MAX(Table1[New Delivery Date(NDD)]),DAY)) Measure = IF(MAX([Customer Name])="C",IF([MeasureX]>3||[MeasureY]>3,"Delayed","Ontime"),IF([MeasureX]>7||[MeasureY]>7,"Delayed","Ontime"))
Pbix here for your reference: https://wicren-my.sharepoint.com/:u:/g/personal/dinaye_wicren_onmicrosoft_com/Eb7qbUrP9DZLuru04lJ2Ps4BFhroClWwEiVOrV-LFn903w?e=YAzzgH
Best regards,
Dina Ye
Hi @v-diye-msft ,
Thanks for the solution and i aprreciate your work..
but i need two outputs..
one for measure X to check its ontime and delay, for all customers <=7 is ontime & >=8 is delay {for Customer C <=3 is ontime & >3 is delay}
another for measure Y to check its ontime and delay, for all customers <=7 is ontime & >=8 is delay {for Customer C <=3 is ontime & >3 is delay}..
Awaiting for your response..
Have a Greatday..
Thanks & Regards,
Kishore Babu P.
Hi,
Thanks for the solution and i aprreciate your work..
but i need two outputs..
one for measure X to check its ontime and delay, for all customers <=7 is ontime & >=8 is delay {for Customer C <=3 is ontime & >3 is delay}
another for measure Y to check its ontime and delay, for all customers <=7 is ontime & >=8 is delay {for Customer C <=3 is ontime & >3 is delay}..
Awaiting for your response..
Have a Greatday..
Thanks & Regards,
Kishore Babu P.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 123 | |
| 99 | |
| 67 | |
| 49 |