Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts,
In the below logic can any one please help me to pass the Dynamic Variables on 2019,2018 and 2017.
if(Match(Priority,'2019 Plan','2018 Plan','2017 Plan'),Priority) as Priority
Thanks in advance.
Try like:
if(Match(Priority,$(vYear)& ' Plan', $(vYear)&' Plan', $(vYear)&' Plan'),Priority) as Priority
Hi @tresesco
Thanks for your reply.
I am looking for backend solution
I have a Year field with 2019,2017 and 2016.
Can you please help me to derive the dynamic variables from this Year field to pass on if logic.
Load
ID,
Year,
if(Match(Priority,'2019 Plan', '2018 Plan', '2017 Plan'),Priority) as Priority
From [lib://test/Plan.qvd];
Thanks in advance
Could you please explain the logic in words?
Hi @tresesco
From Priority Field Max of Year,Second Max of Year and Third Max of Year Plans need to filter dynamically .
Priority field contains the below records
Priority
2019 Plan
2018 Plan
2017 Plan
TBC Plan
Do you want to filter only this field or the entire data set based on the logic?
Only this field
Try like:
Input:
Load
Priority,
Left(Priority,4) as Year
Where IsNum(Left(Priority,4));
Load * Inline [
Priority
2019 Plan
2015 Plan
2018 Plan
2011 Plan
2017 Plan
2010
2009
TBC Plan
];
Tmp:
Load
Year
Resident Input Order By Year;
Let vMax3=Peek('Year',-3);
Output:
Load If(Year>=$(vMax3),Priority) as Priority Resident Input;
Drop Table Input, Tmp;