Moving Average not working properly

Usman Jamil shared this problem 3 years ago
Defect Logged

Hi team

I'm trying to create a 10 week moving average graph of our bought and used. The data is as below

/9ac3e6923953607698a53bd00b2141eb

The 10 week moving averages that Yellowfin is calculating are not correct.

/8c4b63142a353ffaef60c69540d8368f

The issues are


1. It does not allow to skip the first 9, so first 9 averages aren't based on 10 records anyway.

2. The 10th record should be an average of previous 10 records i.e.

14/08/2016, 34844.00, 25022.00

Whereas yellowfin shows it as

14/08/2016, 28177.00, 39,254.00

I have double checked things through attached excel as well, but the averages are way off actual values.

Can someone suggest what could be going wrong here?

Kind Regards

Usman Jamil

Comments (8)

photo
1

Hi Usman,

It looks like Yellowfin is not including the current value in the calculation, and is instead counting the previous X moving average:

08547a5a8b80c0340b7622545284df10

I have raised this as a defect and will update this ticket when action is taken.

Please let me know if you have any questions in the meantime.

Regards,

Nathan

photo
1

Hi Nathan

I guess I attached incorrect snapshot, this is what I should have attached but thanks for setting it up at your end and pointing out the defect.

I see that 10 WMA are being calculated correctly but not being linked to correct date.

Further to this, Is there any way to skip the first 9 records since it shows a huge and incorrect spike when graphed?

51251df27c101c56d7c7216d1080ea50

Usman Jamil | Development Manager

(+613 8622 8506 : |*usmanj@sacsconsult.com.au

www.sacsconsult.com.au

 

Have you read this week’s SACS blog?

 

6f0f9a95d304622382a08cdcbebca5d4     

Follow SACS 6bf3da004e515b61bd215627b3d53ab9 01561fed4206a1895529194ca4bc8fdf

From: Yellowfin Support <support@yellowfin.bi>

Sent: Wednesday, June 6, 2018 2:42 AM

To: Usman Jamil <usmanj@sacsconsult.com.au>

Subject: New Comment in "Moving Average not working properly"

photo
1

Hi Usman,

Currently there is no way to adjust this function other than to create your own. If this is an urgent issue it may be possible to provide you with a basic example of that. If not, you will need to wait for an official fix on both of these (I will include the null gap into the defect ticket).

Nathan

photo
1

Thanks Nathan

Please send me an example of that function. I'll use that till a fix is released.

Usman

photo
photo
1

Hi Usman,

Try the attached file. Load it through the plugin manager and it will appear as Moving Average (Corrected)

Nathan

photo
1

The corrected function works fine. Thanks for sending that through Nathan.

Feel free to close this ticket.

photo
1

Glad to hear it, I will let you know when this is done officially.

photo
photo
1

Hi,

Nathan, has there been any movement with this defect request?

Alternatively, would the fix you supplied above work with 7.2? We are trying to get this client upgraded but in the meantime this is what we're working with.

Also to confirm the plugin will calculate the moving average from the current month back, not the last month back.

Regards,

Peter

photo
1

Hi Peter,


Thanks for your message.


It doesn't seem as if this has been addressed in a fix as of yet. I have gone ahead and checked in with the Developers to understand the status of the defect, and updated it with relevant version information.


I wouldn't suggest trying the jar file as there were significant differences between 7.2 and 7.4, and even if it works there may be some unforeseen consequences of using it in your environment as it is untested. The version of Yellowfin that you are currently using is not currently supported, where I would suggest waiting for this to be included in a supported version of Yellowfin.


Kind regards,

Simon

photo
1

Hi Simon,

OK, thank you for the update.

Would this solution be OK to use should we proceed with the client upgrade (to v9.5) as planned in the near future?

Regards,Peter

photo
1

Hi Peter,


I can confirm that the jar file works in version 9.5.1, where I suspect it would work without problem in your current environment. I recommend popping it into your webapps/ROOT/WEB-INF/lib folder.


Please note that as this hasn't been tested and therefore it isn't technically supported, so please make sure to make backups of your environment. In saying this, I have asked the Developers and they don't see why any issues should occur. I suspect this fix will officially be fixed in the upcoming release of Yellowfin, I will keep you updated on this post.


Kind regards.

Simon