Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Compare current month vs previous month

Hi all,

I do have a field in where I'm stored sales info for last 2 years. The idea is to build a chart showing the current (selected month) and the previuos month.

I have not access to the database to create a new field Sales_PM (Sales previous month).

So, I wondering if there is any way to create a chart with 2 dimensions (Month & Month-1)

Thanks in advance!!!

4 Replies
Not applicable
Author

Hi Diego,

I've attached an example of something which may help you.

Thanks

Not applicable
Author

Hi Xena,

thanks a lot for your example.

Just another little question, because I'm not familiar with the $ behavior.

In my case I write down something like this:

=



Sum(Month = {$(=Month(Addmonths(MakeDate([Calendar Year], [Calendar Month Number]), -1)))>} CustProd_SaleAmtLocalCurr)

But my column stills blank. The question is if the structure of the sentence is ok.

Thanks in advance!!

Not applicable
Author

Is it possible to get that kind of sintax with older QV version (e.g. 7.20)?.

When I write expressions like ...

sum({$} variable)

or

sum( {$<Month = {"$(=Num(Month-1))"}>} amount )

QV application crashs, i.e. it is not taken into account because of a possible error?.

Any suggestion? Thanks in advance.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

The Set Analysis syntax {} is only available in QV8 (8.5?).

-Rob