Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

Hello All, i need to write a set analysis expression. for when sign_flag = 1 and (orderdate - shipmentdate) > 0 then show (orderdate - shipmentdate) i tried writing something like =if((orderdate - shipmentdate))> 0 and count({}(orderdate - shipmentdate)) but it doesnt work, please i need your help urgently. Thanks & Regards, Jaya

1 Solution

Accepted Solutions
sunny_talwar

May be this:

Sum({<sign_flag = {'1'}>} Aggr(If(product_startdate < order_startdate, order_startdate - product_startdate),apt_id))

View solution in original post

5 Replies
Kushal_Chawda

=count({<sign_flag ={1},OrderDate={"=OrderDate-shipmentdate>0"}>}OrderID)

sunny_talwar

May be like this:

If(orderdate - shipmentdate > 0, Sum({<sign_flag = {1}>} orderdate - shipmentdate)

or

If(Only({<sign_flag = {1}>} orderdate - shipmentdate) > 0, Sum({<sign_flag = {1}>} orderdate - shipmentdate)

Not applicable
Author

thanks Sunny and kushal.

Some how the expression you gave didnt work in my application.

i tried this sum({<sign_flag = {'1'}>} aggr(((order_startdate - productdate)),order_id))  in the pivot table but

still i dont get the desired data..

so i want the days differnce of the productdate is before the order date and want those days.

for example if the productdate is 01.05.2016 and the order_startdate is 06.05.2016..

Not applicable
Author

please ignore my previous message.

the below expression works

sum({<sign_flag = {'1'}>} Aggr(((order_startdate - product_startdate)),apt_id))

now i need to add the condition (product_startdate < order_startdate) in the above expression.

how do i add this to the expression.

please help me with this

Thanks & Regards,

Jaya

sunny_talwar

May be this:

Sum({<sign_flag = {'1'}>} Aggr(If(product_startdate < order_startdate, order_startdate - product_startdate),apt_id))