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

Replace value in chart expression

HI,

I have a very simple expression to show the time from receiving data  to it being ordered:

SendDate-OrderDate

this returns the time taken to order a product.

I have a situation where 

day 1 - receive data 
day 2 - ordered
SendDate-OrderDate = 1
day 3 New data received with the same PO Number

SendDate-OrderDate = -1

My question. is it possible in the expression to state 'if minus figure' display text like (New data received and not called off) for example.

Thank you for your help in advance.

Daniel

 

Labels (3)
2 Solutions

Accepted Solutions
Kushal_Chawda

@davyqliks  yes . you can do something like below

=if(SendDate-OrderDate<0,'NewOrder',SendDate-OrderDate)

View solution in original post

Kushal_Chawda

@davyqliks  try below

if(only({<locationcode={'UK'}>}Date_Order)-only({<locationcode={'UK'}>}[Send date])<0,'New Data Received and not called off',only({<locationcode={'UK'}>}Date_Order)-only({<locationcode={'UK'}>}[Send date]))

View solution in original post

5 Replies
Kushal_Chawda

@davyqliks  yes . you can do something like below

=if(SendDate-OrderDate<0,'NewOrder',SendDate-OrderDate)
davyqliks
Specialist
Specialist
Author

wow, thanks for the quick reply, i'll give that a try and feedbacck.

thanks a lot Kush!

 

davyqliks
Specialist
Specialist
Author

Hey Kush,

Thanks again for the below:

 

if(Date_Order-[Send date]<0,'New Data Received and not called off',Date_Order-[Send date])

I wonder, can you assist in adding the following set analysis to this:

{<locationcode={'UK'}>

 

I would expect it was placed after the first bracket but the syntax is not correct.

 

I am struggling to get this parameter into the expression above..,. can you help with this?

Thanks alot in advance.

Daniel 

Kushal_Chawda

@davyqliks  try below

if(only({<locationcode={'UK'}>}Date_Order)-only({<locationcode={'UK'}>}[Send date])<0,'New Data Received and not called off',only({<locationcode={'UK'}>}Date_Order)-only({<locationcode={'UK'}>}[Send date]))

davyqliks
Specialist
Specialist
Author

Hey Kush,

This is great and will help me going forward, thanks so much.

Daniel