Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Changing of Data Depends on Slicer Selection

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.

 

2 ACCEPTED SOLUTIONS
v-diye-msft
Community Support
Community Support

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

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"))

05.png

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

View solution in original post

5 REPLIES 5
v-diye-msft
Community Support
Community Support

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

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...

IDCustomer NameProductDelivery Date(DD)Commercial Doc Sub Date(CDSD)PO DateNew Delivery Date(NDD)X = CDSD - PODATEY = DD/ NDD - PO DateX OutcomeY Outcome
1ASpoon20-06-1922-06-1916-06-1922-06-19    
2AMug21-06-1923-06-1917-06-1923-06-19    
3AShirts22-06-1924-06-1918-06-1924-06-19    
4CJeans23-06-1925-06-1919-06-19     
5CT Shirt24-06-1926-06-1920-06-19     
6BSpoon25-06-1927-06-1921-06-19     
7BMug26-06-1928-06-1922-06-19     
8CShirts27-06-1929-06-1923-06-1929-06-19    
9CJeans28-06-1930-06-1924-06-1930-06-19    
10BT Shirt29-06-1901-07-1925-06-1901-07-19    
11CSpoon30-06-1902-07-1926-06-19     
12AMug01-07-1903-07-1927-06-19     
13CShirts02-07-1904-07-1928-06-19     
14AJeans03-07-1905-07-1929-06-1905-07-19    
15BT Shirt04-07-1906-07-1930-06-19     
16DMug05-07-1907-07-1901-07-1907-07-19    
17DShirts06-07-1908-07-1902-07-1908-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 )DelayedBut 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"))

05.png

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

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

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.

Anonymous
Not applicable

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.

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.