Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two variable taking date from user -vFromDate & vToDate. I am using Input box to accept these values.
Based on these dates I need to filter data in straight table. My data should be based on following conditions.
SDF_DATE Between (Monthstart(Today()) and vToDate And (order_Type= 'FCST')
OR
SDF_DATE Between vFromDate and vToDate and Order_Status='Closed'
OR
SDF_Date<=vToDate and (Order_Type in( 'STD ORD','DEMO ORD')) and (Order_Status<>'CLOSED')
Thanks in advance.
I calculated this in 'Add calculated dimension' with 1 or Null, and selected 'Suppressed when NULL'. It was very easy but took very long. I am just 2 months old in Qlikview. I hope to learn more in this area.
Did you use Ifs in your calculated dimension? That could cause the slowdown. This logic should work in Set Analysis. How many expressions do you have in your charts?
To create this in Set Analysis, you need your expressions to be aggregate functions (most can be converted if they are not now). And then you would do something like:
Sum({
<SDF_DATE={">=$(=Monthstart(Today())<=vToDate"},order_Type={'FCST'}>+
<SDF_DATE={">=vFromDate<=vToDate"},Order_Status={'Closed'}>+
<SDF_Date={"<=vToDate"},Order_Type={'STD ORD','DEMO ORD'},Order_Status-={'CLOSED'}>
} Sales)You may have to do some date formatting in there and I'm not sure if the variables will work directly like that, but that should be close to what you need. This Set Analysis logic would have to go into every expression. It should be quite a bit faster than Ifs.