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: 
reporting_neu
Creator III
Creator III

Changes from the current month compared to the previous month

Hello, I have the following data:

SalesDate SalesMaxDate SalesDateNum SalesMaxDateNum SalesMonth SalesYear Sales
01.01.2024 31.01.2024 45292 45322 Jan. 2024 1.500
02.01.2024 31.01.2024 45293 45322 Jan. 2024 2.000
03.01.2024 31.01.2024 45294 45322 Jan. 2024 2.500
04.01.2024 31.01.2024 45295 45322 Jan. 2024 3.000
... ... ... ... ... ... ...
01.02.2024 28.02.2024 45323 45351 Feb. 2024 40.000
02.02.2024 28.02.2024 45324 45351 Feb. 2024 40.500

 

I always want to use the last day of each month as a data basis and compare it with the last day of the previous month. That's why I also determined the maximum date of each month and wrote it into the table. I also transformed the date into a number so that I can compare better.

This is what the table should look like at the end:

Month / Year Sales Change compared to previous month
01 / 2024 39.500 38.500
02 / 2024 79.500 40.000
03 / 2024 123.000 43.500
04 / 2024 111.000 -12.000

 

Can you help me with the implementation, please?

Labels (4)
3 Replies
Antoine04
Partner - Creator III
Partner - Creator III

Hello,

Does a table like this would fit your expectations ?

Antoine04_0-1718356034194.png

If yes, then try to use the function Above() as used above.

Regards,

Antoine

reporting_neu
Creator III
Creator III
Author

Many thanks for your response.

The “Above” function is very good.
However, when I select a year, Above in January does not take the value from December of the previous year to show the difference there. Is there perhaps another trick? Then it would be perfect!

Antoine04
Partner - Creator III
Partner - Creator III

Maybe with the {1} like this ?

Antoine04_0-1718613981107.png

 

Otherwise, the easiest way might be to do it with the scripting part ... like having a special calendar.

Let me know !

Regards,

Antoine