Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cannot associate current month variable with data to calculate month on month changes

Hi there

I am struggling to calculate the month on month and year on year shifts on Qlik Sense and it would be great to get some help. I have been searching around on the forums and this thread: Qlik Sense: Load Year & Month Variables | Qlik Community was very helpful in showing me to set:

LET vMonthCurrent = Month(Today());

LET vMonthPrevious = Month(MonthStart(Today())-1);

in the data load editor which lists out the correct months in variables:

variable.JPG

Unfortunately I cannot seem to link this with my existing 'Date' column in my spreadsheet. It is formatted as a date in data manager but doesn't seem to link properly (this is when creating a master dimension as =vMonthPrevious):

date2.JPG

When trying to just list the total number of 'page views' for last month I get the sum total when using this expression:

Sum({<Month={'$(vMonthPrevious)'}>}[Page Views])

Has anyone got any ideas/advice on how to get this working?

Thanks

1 Reply
Not applicable
Author

Have solved it!

SUM(IF([Date.autoCalendar.Month]=vMonthPrevious,[Page Views]))

works perfectly if I do it like that.