Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Touix
Contributor III
Contributor III

Have Sum costs by year and the costs of december of last year in a graph table

Hello,

I want to have in one graph Table the sum of the costs BY YEAR  and the costs for December of the last year.
I have for dimension Year, and for the 1st expression :  sum(Costs) --> Easy

But for the sum of the costs for december, this expression does not work : 

 

 

 sum({<Year={"$(=Addyears(Year,-1))"}, Month={12} >} Costs) 

 

 

I join you the sample file to help me.
Thank you veeery much !

Labels (1)
2 Replies
BrunPierre
Partner - Master
Partner - Master

Hi, try this in this situation.

Sum({<Year = {"$(=Year(Today())-1)"}, Month = {12}>} Costs )

Touix
Contributor III
Contributor III
Author

Thank you for your answer.

But I think this will work only for the last year (ie. 2023) 

What if I need this for all the different year ?