Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
PrashantRupani
Creator
Creator

Subtract between two dates

Hi, 

I need to display the # of days it takes for an order to reach to a customer. 

The two dates are Delivery Date  - Order Placed date. I need to display this in KPI . 

How do I write a set analysis expression?

TIA
Prashant

Labels (1)
1 Reply
edwin
Master II
Master II

set analysis is used bec you want to evaluate your expression for a specific condition/criteria.  like dates is in prior month, or only for these selected Regions, where something something...

from your requirement, you just want the straight aggregation across all records (and maybe you already have filters that implement the criteria for you) so you dont need set analysis unless youve omitted other requirements.

you just need to add the aggregation in your kpi (like avg, max, or min - perhaps not sum):
=avg([Delivery Date]  - [Order Placed])

this will give you the average days it takes for deliveries