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: 
nevilledhamsiri
Specialist
Specialist

Latest Three Months Averages with the entry of January

Hi Dear All,

Please see the data loaded where I need to calculate the averages of latest three Months. But when the Month of January added the results produced extends over seven Months Average.The calculations were in order up to December (Always three months averages were given). But once I add January figures averages are for seven Months (July to January). Please see where changes to be done to correct this.

Regds

Neville

12 Replies
jerryyang756
Creator
Creator

What is your expected result?

I can see there is NULL in Num_Month which you have used in the filter.

Load the table as below

Tab1:

NoConcatenate

LOAD BR_CODE,

MONTH,

NUM(Date(MONTH,'MM/DD/YYYY')) as Num_Month,

  REVENUE,

   ACQUISITION_COST,

    INV_OTHER_INCOME,

     FIXED_EXPENSES     

FROM [AVERAGES(2).xlsx] (ooxml, embedded labels, table is Sheet1);

nevilledhamsiri
Specialist
Specialist
Author

Hi Pritam,

Thanks for reply. But once applied, only the January month figure is appeared. I need to show average over latest three Months. (Jan,Dec,Nov )

Thanks

Neville

NoConcatenate

LOAD BR_CODE,

MONTH,

NUM(Date(MONTH,'MM/DD/YYYY')) as Num_Month,

  REVENUE,

   ACQUISITION_COST,

    INV_OTHER_INCOME,

     FIXED_EXPENSES    

FROM [AVERAGES(2).xlsx] (ooxml, embedded labels, table is Sheet1);

//LOAD *, Num(month(date#(MONTH,'MMM'))) as Num_Month;

//

//LOAD BR_CODE, MONTH, REVENUE, ACQUISITION_COST, INV_OTHER_INCOME, FIXED_EXPENSES, I

//FROM (ooxml, embedded labels, table is Sheet1);

Directory;

LOAD CLDOR, CLNO, CLMPRD, CLSPRD, CLBRCOD, CLPOLNO, CLNAME, CLOBAL, CLAMTPRO, CLFPAID, CLADJUS,

     CLBAL, CLRECOB, CLRECAD, CLRECR, CLRECBL, RFOBAL, RFPROV, RFRECE, RFCBAL, MAIN_RECV, CLRECTYP,

     CLDOL, CLDORV, CLREAS, CLTYP, CLFDOP, CLTYPA, CLTYPF, CLTYPR, CLMECOD, CLSUMI, CLFROM, CLTO,

     CLCLOS, CLRISK, MECODE, CLTECVAL, CLDAMAGE, CLOSREAS

FROM (biff, embedded labels, table is Sheet1$);

jerryyang756
Creator
Creator

Please check the application . I have replaced the Num_Month with MONTH and using Date filter.

nevilledhamsiri
Specialist
Specialist
Author

Can you please send me the expression & script in a note pad since I have a personnel edition

Thanks

Neville

nevilledhamsiri
Specialist
Specialist
Author

Hi Pritam,

Could you please reply on a note pad. Sorry for troubles made

Regds

Neville

nevilledhamsiri
Specialist
Specialist
Author

Please be good enough to look in to this!

Regds

Neville

nevilledhamsiri
Specialist
Specialist
Author

Please look in to this!

Regds

Neville

nevilledhamsiri
Specialist
Specialist
Author

Dear Pritam,

Could you please send me your working on a note pad!

Regds

Neville

nevilledhamsiri
Specialist
Specialist
Author

Please see to this

Thanks

Neville