Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
nevilledhamsiri
Specialist
Specialist

Continuety of Running Avearge

Hi,

Please refer my chart where only three months actual were stated with balance months zero values. But Running average calculated continue with different values.Of course for Ra eg, it should be 6.8 millions even for rest of the Months.Please see why this is so!

Expression used as follows!

IF(RowNo()=0,  Sum(REVENUE)/COUNT(REVENUE),RangeAvg(Above(RangeSum(REVENUE),0,RowNo())))

Thanks

Neville

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Avg(Aggr(Sum(REVENUE),BR_CODE,MONTH))

View solution in original post

17 Replies
Anil_Babu_Samineni

Try this?

Aggr(IF(RowNo()=0,  Sum(REVENUE)/COUNT(REVENUE),RangeAvg(Above(RangeSum(REVENUE),0,RowNo()))), (BR_CODE , (NUMERIC, ASCENDING)))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

Dear Anil,

It wont produce results, please see why

Thanks

Neville

Anil_Babu_Samineni

Please make one example and share expected result

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

This is my excel where said expression was derived at!

    

BR_CODEMONTH REVENUE COMM
RAJUL         6,900,000      1,200,000
RAAUG         6,800,000      1,150,000
RASEP         6,700,000      1,300,000
RAOCT
RANOV
RADEC
EHJUL         2,800,000          350,000
EHAUG         2,700,000          250,000
EHSEP         2,500,000          300,000
EHOCT
EHNOV
EHDEC
K7JUL         1,200,000          250,000
K7AUG         1,100,000          350,000
K7SEP         1,500,000          150,000
K7OCT
K7NOV
K7DEC
Anil_Babu_Samineni

Please post sample QVW to look and explain the result set in excel. That makes lot help

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

Dear Anil,

Once I try to attach qvw  below message comes up. Please see why it is. I used the above icon looks like a camera to attach my qvw file.

''That image type is forbidden"

Thanks

neville

Anil_Babu_Samineni

That means you are attaching Image only. Try to follow like attached images in sequence manner

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
nevilledhamsiri
Specialist
Specialist
Author

   Please attach a sample how I will do this

Thanks

Neville

Anil_Babu_Samineni

Attach missing.. Please make sure to provide output where we need to get. And please read provide link Uploading a Sample

POS - Please start from second image from this discussion

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful