Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Save the Date: QlikWorld Online, June 24-25, 2020. Free global virtual event for data integration and data analytic gurus. Register Today
Highlighted
Valued Contributor

Always to take in to account latest three Months Avearge!

Dear All!

Please refer P/T made based on the excel data give below. Expression used for getting the averages are tow given below. But this is not the out put I need. I need only latest three Months average to be considered. I have figures for 4 months. Help me to consider average of ( Oct down to the Aug) to be taken.

Regds

Neville

AVG(AGGR(SUM(NRP),BRANCH,MONTH))

   

BRANCHMONTH NRP COMMEXPENSES
RAJUL         500,000          200,000            50,000
RAAUG         650,000          150,000            75,000
RASEP         500,000          125,000          125,000
RAOCT         450,000          100,000          100,000
EHJUL         400,000            45,000            75,000
EHAUG         450,000            55,000          125,000
EHSEP         250,000            25,000          125,000
EHOCT         325,000            50,000          150,000
1 Solution

Accepted Solutions
Highlighted

Re: Always to take in to account latest three Months Avearge!

Try to reply over my conversation only rather yours. And here you go

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

14 Replies
Highlighted
Valued Contributor

Re: Always to take in to account latest three Months Avearge!

Please help me on this!

Thanks

Neville

Highlighted

Re: Always to take in to account latest three Months Avearge!

Is this you are going to see?

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Valued Contributor

Re: Always to take in to account latest three Months Avearge!

No,

Anil, I need the average of latest three Months (AUG+SEP+OCT)

Thanks

Neville

Highlighted

Re: Always to take in to account latest three Months Avearge!

Expected result?

EH - 14,25,000

RA - 21,00,000

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Valued Contributor

Re: Always to take in to account latest three Months Avearge!

No,

Actually I need to have average of latest three Months. The figures should be like below

        NRP          COMM    EXPENSES  PROFIT

RA  533            125               100         308

EH  341            43                 133         165

Thanks

Neville
           

Highlighted

Re: Always to take in to account latest three Months Avearge!

PFA

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Valued Contributor

Re: Always to take in to account latest three Months Avearge!

Dear Anil,

Please send me the expression used!

Neville

Highlighted

Re: Always to take in to account latest three Months Avearge!

Try to reply over my conversation only rather yours. And here you go

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

Highlighted
Valued Contributor

Re: Always to take in to account latest three Months Avearge!

Your solution did work!. But since I am not that famillar with the month presentation used such as below & please explain followings! This is for mr to grasp this more.

What is meant by "FLOOR'

What is 1e3 mean , Is is 1/3 we generally used.

Num_Month refers to Number of Months or otherwise

Is there any other simple way the latest average may be taken.

While thanking you, I hope you to explain on these terms used & if possible please suggest a lighter way of calculating this which will be of important.

Neville

Num(month(date#(MONTH,'MMM'))) as Num_Month Inline

Floor(Avg({<Num_Month = {">$(=Max(Num_Month-3)) <=$(=Max(Num_Month))"}>} NRP)/1e3)