Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

This month vs. previous month

Hi,

I am trying to compare a QVD from this month with previous month.  Each month I create a QVD with the month in the title. Please see below:

Let vtoday = Date(today(1),('MMM YYYY'));

Store PIF_History into Y:\PL Operations\Leaders\Analyst\SSharma\PIF_History\PIF_History_$(vtoday).qvd(qvd);

I need to set up another variable which will bring in previous month. For example, in July I need to compare results with June.

Please let me know if you can help or if you need further explanation.

Thank you.

2 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Saurav - How are you doing mate?

As long as the schema of both the QVDs are same...you can use the Exists() function to compare the fields within QVD. You can use the Exists() with the Load statement and check both the QVDs. Please post the sample application if you need the syntax/script.

I hope this helps!

Cheers,

DV

www.QlikShare.com

Not applicable
Author

Use a wildcard load

LOAD *

FROM PIF_History_*.qvd;

That will load all files, you will have to tweak if if you do not want them auto concatenating