Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
As I'm new to Qlik Sense, can I please get some help on the following issue in Qlik Sense:
I created a table that has a single column dimension such as:
Jul-14 |
Aug-14 |
Sep-14 |
Oct-14 |
I then want to create a measure that calculate the sales of the previous year (which I do have in my loaded data) corresponding to the dimension so that it looks like this:
Jul-14 | Sales of Jul-13 |
Aug-14 | Sales of Aug-13 |
Sep-14 | Sales of Sep-13 |
Oct-14 | Sales of Oct-13 |
Thanks for reading and helping out. Cheers.
You'll need a table that links each month with the month of the year before.
AsOf:
LOAD Distinct MonthYear as ReportMY, MonthYear, 'Current' as Period
FROM ...source...
Concatenate(AsOf)
LOAD Distinct MonthYear as ReportMY, date(AddYears(MonthYear, -1),'MMM-YY') as MonthYear, 'Previous' as Period
FROM ...source...
The above assumes you've already turned the MonthYear field in a date field formatted in the MMM-YY format (or created a MonthYear field from your source field using the date# and date functions.
Thanks for the help Gysbert. Cheers!