Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Variable Help

Hello,

I am looking for some help regarding setting up a variable.  I am looking for a variable that selects all months up to the current if no months are selected, or sums up to the selected month.

Example - I have data through February so with no selection should sum through Feb.  Otherwise sum through other months selected.  I need this to be dynamic and I believe I have some of the working parts, I just cannot get them to all work properly.

variable to set up -

vMaxSumMonth - =if(GetSelectedCount([MONTH-NUMERIC])<>1,$(vMaxSumMonthPart1),$(vMaxSumMonthPart2))

Parts I am getting wrong-

vMaxSumMonthPart1 = "<=$(=vBusinessMonthNumber)" or sum up through current Business Month number which is 2

vMaxSumMonthPart2 = "<=$(=max({<YEAR={$(=max(YEAR))}>} [MONTH-NUMERIC]))" or sum up through max possible month of 2015

Thank you,

Justin

1 Reply
Anonymous
Not applicable
Author

Just wanted to follow up if anyone had a chance to see my problem and had any thoughts.

Thanks again for the help,

Justin