
Re: Avg with missing Data (aggr?)
Sunny Talwar Sep 13, 2017 10:59 AM (in response to Kevin Nagel)
Test Avg Aggr 20170913.qvw 167.5 K

Re: Avg with missing Data (aggr?)
Kevin Nagel Sep 13, 2017 11:34 AM (in response to Sunny Talwar )Hi Sunny,
thank you for your quick Response.
Doesn't this solution burry the possibility of miscalculation if there's a Buchungsdatum missing? for example if we'd have a selection, where there are not all Buchungsdatum given, or worse if there was a single Buchungsdatum missing for all data. That would lead to wrong calculations. I am searching expecially for a solution, that would be applicable for stdev(), since that also uses averages. That actually is the Problem behind the question. I Need to calculate the Standard Deviation for a set of values, per article. And most articles doen't have consumptions on every day. Which leads to wrong calculated values...

Re: Avg with missing Data (aggr?)
Sunny Talwar Sep 13, 2017 11:37 AM (in response to Kevin Nagel)This can be the other way
Sum(Menge)/(Floor(MonthEnd(Max(Buchungsdatum)))  MonthStart(Max(Buchungsdatum))+1)

Test Avg Aggr 20170913.qvw 167.5 K

Re: Avg with missing Data (aggr?)
Kevin Nagel Sep 13, 2017 12:00 PM (in response to Sunny Talwar )but this wouldn't be of any use for the stdev, would it?

Re: Avg with missing Data (aggr?)
Sunny Talwar Sep 13, 2017 12:05 PM (in response to Kevin Nagel)Not sure I understand why.... what is the output that you are looking to get from your sample?

Re: Avg with missing Data (aggr?)
Kevin Nagel Sep 13, 2017 12:23 PM (in response to Sunny Talwar )I'd like to calculate the stdev per article on a weekly Basis.
That at the Moment doesn't work out, because I don't know how to skript the set Analysis in that way, that it calculates the Standard Deviation correctly... Standard Deviation

Re: Avg with missing Data (aggr?)
Sunny Talwar Sep 13, 2017 12:26 PM (in response to Kevin Nagel)I guess I am trying to understand what are the numbers you are looking to get within the attached sample?

Re: Avg with missing Data (aggr?)
Kevin Nagel Sep 15, 2017 2:17 AM (in response to Sunny Talwar )Thank you for your help. I decided to go with a different solution. I used an ifStatement to have '0' as a result of the sum calculation, in order to get values for Dates, where there had been no consumption.
Then I put it in a Pivot table and used the Dates in the column. That i exported via a makro and imported back into qvw.






