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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare Sum of Month with Sum of previous Month

Hi all,

I would like to calculate the sum of a Month and compare it with the sum of the previous month to find the difference between those two.

E.g.    sum(Anzahl_Autos) //in February

          sum(Anzahl_Autos) //in January

// And the find the difference

And so on over the whole year. So that I can build a chart to display the 'Growth' of several Periods

I tried a lot, but couldn't find a solution.

In the attached file you can find some test data.

It would be so nice if somebody could help me with that.

Kind regards

Philipp

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

In the table showing quantity by month, add the expressions:

=Column(1) - Alt(Above(Column(1)), 0)                                   // for growth

=Alt((Column(1) - Above(Column(1))) / Above(Column(1)), 1)   // for % growth

t2.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

5 Replies
marcus_sommer

Have a look on the last links in this posting: How to use - Master-Calendar and Date-Values

- Marcus

jonathandienst
Partner - Champion III
Partner - Champion III

In the table showing quantity by month, add the expressions:

=Column(1) - Alt(Above(Column(1)), 0)                                   // for growth

=Alt((Column(1) - Above(Column(1))) / Above(Column(1)), 1)   // for % growth

t2.png

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

hi, thanks for the help!!

Is it possible, or is there a way to use the above() function also if I have 2 dimensions?!

Anonymous
Not applicable
Author

Just add your required dimension, it should work.