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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Current Year vs Prior Year (YTD)

I have created a display which shows a tree map for the current year, and another separate tree map for the previous year (YTD).

So if I choose months 3 - 5, it should just show the information relating to those months in the tree maps.

For the Current Year it works perfectly. The measure expression is as follows:

sum({<TransactionType={'Month_CCV_Rands'},FinancialYear={'$(v_Monthly_Current_Financial_Year)'}>}Amount)

But for the Previous Year (YTD) it seems to ignore the selection, even though the months fall within the data available. The measure expression is as follows:

sum({<TransactionType={'Month_CCV_Rands'},FinancialMonth={"<=$(v_Monthly_Current_Month)"},FinancialYear={'$(v_Monthly_Last_Financial_Year)'}>}Amount)

Is there a way to have the best of both worlds where by default it shows YTD and then upon selection it will change accordingly?

1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Not sure I understand your requirement completely, but may be try this:

Sum({<TransactionType = {'Month_CCV_Rands'}, FinancialMonth *= {"<=$(v_Monthly_Current_Month)"}, FinancialYear ={'$(v_Monthly_Last_Financial_Year)'}>} Amount)

View solution in original post

1 Reply
sunny_talwar
MVP
MVP

Not sure I understand your requirement completely, but may be try this:

Sum({<TransactionType = {'Month_CCV_Rands'}, FinancialMonth *= {"<=$(v_Monthly_Current_Month)"}, FinancialYear ={'$(v_Monthly_Last_Financial_Year)'}>} Amount)