5 Replies Latest reply: Jun 8, 2016 5:50 AM by Sunny Talwar

# 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

• ###### Re: Set Analysis

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

• ###### Re: Set Analysis

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)

• ###### Re: Set Analysis

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..

• ###### Re: Set Analysis

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.

Thanks & Regards,

Jaya

• ###### Re: Set Analysis

May be this:

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