Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to sum the previus 12 months with set analysis

Hello everyone!

I’m having troubles with the following set analysis issue:

I have a pivot table with "hours per day" and i want to sum in each row the 12 previous months using set analysis (and without using de "Previous", or "above" functions) because after that I will need to calculate the variation between the value of this new column.

   

        FECHACIERRE_CPI_QV                   hs       SUM
20/01/20097.363137.777
20/02/200911.116148.893
20/03/200913.306162.069
20/04/200922.964155.566
20/05/200913.155160.449
20/06/200911.789160.912
20/07/20091.529153.779
20/08/200915.765156.168
20/09/20095.038150.296
20/10/200910.043148.238
20/11/200914.683137.976
20/12/20093.138129.889
20/01/20104.182126.707
20/02/20106.636122.227
20/03/201010.313119.234
20/04/201011.004107.274
20/05/20106.869100.988
20/06/20107.51996.718
20/07/201019.356114.545
20/08/20108.261107.041
20/09/20104.984106.987

I've tried with

  SUM

({1<  FECHACIERRE_CPI_QV

= {'>=$(=Date(FECHACIERRE_CPI_QV

-365))<=$(=Date(FECHACIERRE_CPI_QV

))'} >}      
HS

)

but didn't work... any suggestion?

Thanks!!

0 Replies