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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Another Date Set Analysis question

I'm trying to do something apparently very simple which is a value from a previous month, but I just can't get it. I've tried with:

sum({1<Date={'$(=Addmonths(Date,-1))'}>} Amount)

but it doesn't work. Can anyone point out what's wrong?

3 Replies
Not applicable
Author

I think your Set Analsysis is requiring the Date to be one month less than itself. I think that will always be the empty set.

I used this (with a variable in the AddMonths) and it worked:

Sum({<Date = {'$(=AddMonths('$(=vDate)', -1))'}>}Amount)


Remember, you can see what you dollar sign expansion evaluates to be placing the expression in a straight table and not using a label. If you expand out that column, you will see your Set Analysis expression with the dollar sign expansion evaluated.

Not applicable
Author

Thanks for your answer.

That would help me if the comparison date was always static, but basically what I'm attempting to do is have a pivot table with the Monthname(Date) as a dimension, and as expression the sum of Amount from the previous month. I hope that made sense Confused

Not applicable
Author

I forgot to add, I've tried using below, but it's not working either..