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

Calcualting a Previous Months Data

Hi,

I'm hoping someone can help me. I'm trying to get a table to show the selected dates data and also the previous months data.

I've have got a variable setup that calculates the previous month, which seems to work fine, I then want to use that variable to show the data for that month.

Hope that make sense.

I've attached an example to show what I have done so far.

Thanks for looking its much appreciated.

Cheers

Simon

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

If you use MonthYear as a dimension you won't get the previous months result on the same line. You could remove the dimension and only use expressions. See attached qvw.


talk is cheap, supply exceeds demand
Not applicable
Author

Hi

Thanks for the response. I've attached the more complex sheet that i'm using as I still cant get it to work and cant work out why.

Help would be very much appreciated.

Cheers

Simon

Not applicable
Author

Simon, the problem you are having is that both dimensions and set expressions work on subset logic. You are basically asking the computer to calculate the sum of all items for which month=December is true and month=January is true, and getting 0.

I'm a little less sure how to fix it, however.