Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I want to display the data for last 12 or say last 24 months from current date(say today). How do i do this in qlik sense using set analysis or something?
Use set analysis like this:
count({<[Date_field]={">=$(=addmonths(monthend(max([Date_field])),-12)) <=$(=max([Date_field]))"}>} Value)
Change Date_field fand Value for your date/value field.
Where do you want to display this data in? A Filter pane or a chart? Can you post a small Qlik Sense app that demonstrates the problem?
I want to display a chart of last 12 months
Use set analysis like this:
count({<[Date_field]={">=$(=addmonths(monthend(max([Date_field])),-12)) <=$(=max([Date_field]))"}>} Value)
Change Date_field fand Value for your date/value field.
Thank you!! I was using pretty much the same code but was doing a silly mistake. It Works now.
Cheers!!
You're welcome! Please, mark the answer as correct so other people can use this too