Discussion Board for collaboration related to QlikView App Development.
I'd like to set an option where if i click a button , I need to select last 4 values in a field
Example : in this scenario , the field Campaign Starting Quarters has values : Q1-13 , Q2-13, Q3-13,Q4-13,Q1-14,Q2-14,Q3-14,Q414
I'd like to select the last 4 values which 'll be Q1-14,Q2-14,Q3-14,Q4-14
Is there a max function or any other function or code that allows me to do this?
Thanks a lot in advance
try with the action select in field
='(' & concat(aggr(if(rank(right(field,2) & left(field,2) )<=4,field),field), '|') & ')'
RESULT
TEST SCRIPT
load * inline [
field
Q1-12
Q2-12
Q3-12
Q2-13
Q3-13
Q4-13
Q1-14
Q4-12
Q1-13
Q2-14
Q3-14
];
Check this
try with the action select in field
='(' & concat(aggr(if(rank(right(field,2) & left(field,2) )<=4,field),field), '|') & ')'
RESULT
TEST SCRIPT
load * inline [
field
Q1-12
Q2-12
Q3-12
Q2-13
Q3-13
Q4-13
Q1-14
Q4-12
Q1-13
Q2-14
Q3-14
];