Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Month-over-Month expression in straight table

Hello. I am trying to create an expression that looks at month-over-month changes. This would be in a straight table. The month dimension of the chart is named [Ordered Month].

Here is the current period expression:

SUM([Running Day Count])/COUNT([Magnet Order ID])

I have tried all sorts of set notation. I think I'm on the right track, because this expression quasi-works:

SUM({<[Ordered Month] = {May}>} [Running Day Count])/(COUNT({<[Ordered Month] = {May}>} [Magnet Order ID]))

Obviously, I am hard-coding May in the expression formula above. This works, but only for the row in my table for May. I want to generalize this formula to be the previous month for each month value in the dimension. Once I do that, I'll subtract this good formula from the basic sum()/count() expression to get the month-over-month delta.

Unfortunately, I don't have an easy way to scrub out senstive data in order to post the .QVW here. I appreciate any help you can offer!

Thanks!

Message was edited by: sdseasd1 (formatting code chunks appropriately)

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Instead of the set expression, use

=above(column(1))

to retrieve the value for the previous month that is calculated in column(1)

[Or repeat your expression:

=above( YourExpressionComesHere )

]

View solution in original post

2 Replies
swuehl
MVP
MVP

Instead of the set expression, use

=above(column(1))

to retrieve the value for the previous month that is calculated in column(1)

[Or repeat your expression:

=above( YourExpressionComesHere )

]

Not applicable
Author

Wow... I was going in the completely wrong direction. Thank you very much for the quick response.