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

Expression - comparing totals cost between 2 date ranges & calculating difference percentage

Hi

I am looking to produce a straight table which shows by department a comparison between the total costs arising last month (-1) against the total cost arising  for the month  before (-2) and then show the difference percentage between the 2 months

I have the data set - 'costs' and 'creation date', 'creation month' and 'department' (see excel).  I would like to build an expression which totals all the costs with a creation date last month and compare this with the total cost with a creation date that falls in the prior month (-2)

How would I develop such an expression? and how do I ensure this continues to roll on as we progress though the year

Thanks

Rohan

1 Reply
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

See attached example. If you simply add data for new months the expression will automatically show the last two months. If you select a month then it will show that month and the previous month.


talk is cheap, supply exceeds demand