How coluld I achieve this average price calculation in Yellowfin?

mbacul shared this question 7 years ago
Answered

Hello!


I would like to calculate an average price, based on a dataset similar as this one:


a669371a07585741f13bc49b4badc5b1


With a calculated field, I get the price (€/Kg) for each day with no problem. What I want to do next, is to accumulate the quantity (Kg) and the Amount(€) for each day. Then, with this accumulated data, I want to get an average price. In excel, it would be:


4854e681ca227756907cc148e7eb6b51


where Acumm. €/Kg = Acumm. € / Acumm. Kg


I have tried to do this in Yellowfin, with no luck.


1.- With advanced function (Acummulated total), I get the Acumm. Kg and Acumm. €, but I cannot add a second advanced function to achieve the division, nor use this fields for a calculated field.


2.- I have tried to use a subquery with the advanced functions for Acumm. Kg and Acumm. €, and use this fields in the main query to create a calculated field. This does not work, the value for the calculated field does not use the advanced function result, maybe it is a bug?


44b1c2e61d02e9c04b20e853cbbc65d7


What would be the best way to achieve this?


Thank you!

Miguel

Best Answer
photo

Miguel,


Thank you for your question. The way that Yellowfin is able to achieve the requested functionality is via the report from report functionality. This functionality is explained at this link. With this you are able to create the calculation you need over the 2 calculated fields.

b9a416b5b6789a885681510bc9a61d24


If you have more questions do not hesitate to reach out.


thanks,

Matt Wilson

Replies (1)

photo
1

Miguel,


Thank you for your question. The way that Yellowfin is able to achieve the requested functionality is via the report from report functionality. This functionality is explained at this link. With this you are able to create the calculation you need over the 2 calculated fields.

b9a416b5b6789a885681510bc9a61d24


If you have more questions do not hesitate to reach out.


thanks,

Matt Wilson

photo
1

Matt,


Thank you very much, I didn´t know this funcionality!


I see that a report cannot act as a view if it has filters. In my real scenario, the fields in the "view report" depend on a filter (A date from which the Acumm. values are calculated).

For this scenario, I think I can manage to redesign the report so I do not need that filter, but I think it would be great that the report that is converted to a view could have filters, that would act as view parameters. Reports that use that view should then provide that parameters to the view.

Maybe too complex, just an idea...


Thanks again for your help!


Miguel

photo
Leave a Comment
 
Attach a file