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: 
anushree1
Specialist II
Specialist II

Count if using Set Analysis

HI,

I am trying to get the count of orders where estimated delivery date=ship date (Ontime deleveries) and estimated delivery date>=shipdate+5(offbeat deleveries.)

I have achieved it through count if like :count(if([Ship Date]=EstimatedDeliveryDate,[Order ID]))

But can this be written using set analysis i did try count({<[Ship Date]=p(EstimatedDeliveryDate)>}[Order ID]), but does not work

Also how can i find offbeat deliveries i.e., the second case using set analysis

I do understand i can create a flag in the script and pass it as condition in set analysis.

But would like to know if it can be done without creating any flags in the backend

 

1 Solution

Accepted Solutions
sunny_talwar

May be try this

Count({<[Order ID] = {"=[Ship Date] = EstimatedDeliveryDate"}>} [Order ID])

View solution in original post

3 Replies
sunny_talwar

May be try this

Count({<[Order ID] = {"=[Ship Date] = EstimatedDeliveryDate"}>} [Order ID])
anushree1
Specialist II
Specialist II
Author

sure it does thanks, how about the second scenario if shipdate>estimatedeliverydate+5

sunny_talwar

May be this

Count({<[Order ID] = {"=[Ship Date] > EstimatedDeliveryDate + 5"}>} [Order ID])