Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can anybody help me making Monthly Average?
I have this data:
Customer, Date, value
A, 2013-08-29, 2
A 2013-08-30, 4
A, 2013-08-31 ,6
A ,2013-09-01 ,4
A ,2013-09-02 ,2
A ,2013-09-03 ,8
A, 2013-09-04, 3
As you can i see its over TWO months.
I would like an average on month.
Like August it would be 12 / 2months = 6 in average
and in september its 17 / 2 months = almost 8
If we go into october it should automaticcaly change to be 12 /3 and 17 / 3 and so on.
Create a Month field in the script:
Load
Customer,
Date,
Month(Date) as Month,
value
From ...mysource...;
Then use the new Month field as dimension and sum(value)/count(total distinct Month) as expression.
Create a Month field in the script:
Load
Customer,
Date,
Month(Date) as Month,
value
From ...mysource...;
Then use the new Month field as dimension and sum(value)/count(total distinct Month) as expression.
But what if it is in a textbox?