Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I've the following condition to calculate the the rolling avg.
sum({<MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -13), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), -1), 'MMM-YY'))"} >} STBEL)
Now I want to add so it only do this calculation if order type equals "2" ( STOTYP=2 )
I'm not sure where the first calculation starts and stops (new to Qlikview)
Can someone please help me to add this condition to the calculation.
Many Thanks
sum({<MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -13), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), -1), 'MMM-YY'))"}, STOTYP = {2}>} STBEL)
Essentially, you can place it before or after the MonthYear = {} condition.
The QlikView's Help file is a good place to help you understand Set Analysis a little better.
S.
Before the last angle bracket (>), include ,STOTYP={2}
This will add the second condition. Don't forget the comma to separate the conditions.
Eduardo
sum({<MonthYear ={">=$(=Date(addmonths(Max(MonthYear), -13), 'MMM-YY')) <=$(=Date(addmonths(Max(MonthYear), -1), 'MMM-YY'))"}, STOTYP = {2}>} STBEL)
Essentially, you can place it before or after the MonthYear = {} condition.
The QlikView's Help file is a good place to help you understand Set Analysis a little better.
S.
Can't you simply add
<STOTYP={2} at the start of the set analysis
Thanks Shawn