Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content
Announcements
Gartner® Magic Quadrant™: 15 YEARS A LEADER - GET THE REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
SimonDB
Contributor III
Contributor III

Show data for 12 months earlier

Hi, I hope you can help me. I know I've done this previously, but cannot remember how.

I'm trying to show a sum(Value) for the same month - 12 months (i.e. Dec '24 shows the Sum(Value) for Dec '23).

I've tried a number of variations similar to this, but just get 0's

Sum({$<[Date]={"=$(AddMonths([Date],-12))"}>} Value)

SimonDB_0-1741699698015.png

Any help would be greatly appreciated. Many thanks, Simon

 

This is the data I'm loading, then joining to a calendar

TEMP:
LOAD * INLINE [
Date, Value
01/10/2022, 8
01/10/2022, 3
01/11/2022, 2
01/11/2022, 1
01/12/2022, 6
01/12/2022, 7
01/10/2023, 10000
01/10/2023, 1000
01/11/2023, 500
01/11/2023, 5000
01/12/2023, 2500
01/12/2023, 250
01/10/2024, 30000
01/10/2024, 300000
01/11/2024, 400000
01/11/2024, 40000
01/12/2024, 50000
01/12/2024, 500000
];

4 Replies
marcus_sommer

You need to remove the year-information from your vertical dimensions - just showing the month + adding the year as horizontal dimension (pivot-chart) with a single expression or using two expressions (one with the reference to the max. year and the other to max year - 1).

SimonDB
Contributor III
Contributor III
Author

Thanks Marcus, however in my "real world" application I cannot use a pivot table 😞

marcus_sommer

Another approach could be The As-Of Table - Qlik Community - 1466130.

EnriqueTellez82
Contributor
Contributor

Hola has intentado con =Above(sum(Valor),3), el 3 es por los meses que tienes en común entre años

OSZAR »