Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using if expression to create field On Time delivery

Hi,

I am building my first QW document so bear with me if I am a bit slow! I am trying to build a report to measure my suppliers Delivery Performance. For this I am comparing the Confirmed Delivery Date with the actual Delivery date as follows:

 

(ConfirmedDate-GRdate) as GRdelta

GRdelta gives a difference in days. Just to make it simple I would like to start with only measuring late deliveries and have been trying to create a field DP using the following if-expression:

 

If

(GRdelta>0, 0, 100) as DP               

This did not work however...

I want the field DP so that I can calculate the average Delivery Performance.

What is wrong with the expression? Can someone offer an alternative solution?

Thanks

Henrik

1 Solution

Accepted Solutions
Not applicable
Author

Try this expresion if this is defined in the script

for delivery lates

If((ConfirmedDate-GRdate)>0, 0, 100) as DP              

for averange

avg(GRdelta)

i hope helps.

View solution in original post

2 Replies
Not applicable
Author

Try this expresion if this is defined in the script

for delivery lates

If((ConfirmedDate-GRdate)>0, 0, 100) as DP              

for averange

avg(GRdelta)

i hope helps.

Not applicable
Author

Thank you, that worked fine!

Thanks for the help