Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
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