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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Comparing monthly data

Hello everyone,

I am new to Qlikview and have a problem I'm struggling with.

I would like to compare data from the selected month with a previous month.

My data field has been set up as following: LOAD Date(Date, 'MM-YY') as DateAB,

What expression should I use in order to compare data from the selected month with the previous month?

Thanks in advance!

13 Replies
martynlloyd
Partner - Creator III
Partner - Creator III

Hi Vik,

Best practice is to create a month dimension in the load, and then to use a master calendar to flag which month is current and which is previous.

You could miss out the master calendar and start with

LOAD

Date(Date, 'MM-YY') as DateAB,

Month(Date(Date, 'MM-YY')) as MonthAB

...

If you are not comfortable with set analysis, then even simpler is:

LOAD

Date(Date, 'MM-YY') as DateAB,

IF(Month(Date(Date, 'MM-YY'))=Month(Today()),Amount,0) as CurrMonthAmount,

IF(Month(Date(Date, 'MM-YY'))=Month(Today())-1, Amount,0) as PrevMonthAmount,

...

Kind regards,

Marty.

Not applicable
Author

Thank you for your answer Martyn,

I have processed your first option. What set analysis formula should I now use?

It may also be important to note:

Every document I uploaded into Qv has a separate date.

Document 1: 9-16

Document 2: 10-16

Document 3: 11-16

And so on.

Also, the format that these dates have in excel: '31/07/16', being the last day of the month.

Regards,

martynlloyd
Partner - Creator III
Partner - Creator III

Hi Vik Vik,

How are you getting on with this issue?  I have been away for a few weeks, so sorry if you still waiting for a solution.

Kind regards

Marty.

Not applicable
Author

Hello Martyn,

The matter isn't urgent for me. So I haven't found a correct answer yet.

There isn't really an update from my last answer to you.

So every feedback is still very welcome!

Thanks in advance,

Vik