Comment comparer deux périodes sur Qlikview ?

0
112
This QlikView shows how basic Set Analysis syntax can be used to deliver a Prior Period Comparison.

If you want to copy and paste the table from this example into another document you can set all the variables by adding this code to your load script:

 

let vMaxDate  = ‘=max(Date)’;

let vMaxDay   = ‘=day(max(Date))’;

let vMaxMonth  = ‘=month(max(Date))’;

let vMaxYear  = ‘=max(Year)’;

let vPriorMonth  = ‘=month(addmonths(max(Date),-1))’;

let vPriorMonthYear = ‘=Year(addmonths(max(Date),-1))’;

let vPriorYear  = ‘=vMaxYear-1’;

let vPriorYearDate = ‘=date(addyears(max(Date),-1),’ & chr(39) & ‘DD MMM YYYY’ & chr(39) & ‘)’;

 

Obviously you will need to change the field names to match the date fields in your data model.

Attachments
 PriorPeriodComparison.qvw (179.50 KB)
http://www.qlikisrael-support.com/Knowledgebase/Article/View/61/11/qlikview-app-set-analysis—prior-period-comparison

LEAVE A REPLY

Please enter your comment!
Please enter your name here