Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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