Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Greetings, i'm having a little problem here.
I want to Sum the value by week and create a new column with that value.
I want to calculate this in script.
Table 1:
WeekYear | Value
2015/37 | 24
2015/37 | 30
2015/37 | 6
2015/37 | 0
2015/38 | 24
2015/38 | 24
2015/38 | 2
2015/38 | 6
Final Table:
WeekYear | Value | TotalValue/Week
2015/37 | 24 | 60
2015/37 | 30 | 60
2015/37 | 6 | 60
2015/37 | 0 | 60
2015/38 | 24 | 56
2015/38 | 24 | 56
2015/38 | 2 | 56
2015/38 | 6 | 56
Please help me if you can
Best regards
Simão Ribeiro
Try this:
Table:
LOAD WeekYear,
Value
FROM Source;
Left Join (Table)
LOAD WeekYear,
Sum(Value) as [TotalValue/Week]
Resident Table
Group By WeekYear;
Try this:
Table:
LOAD WeekYear,
Value
FROM Source;
Left Join (Table)
LOAD WeekYear,
Sum(Value) as [TotalValue/Week]
Resident Table
Group By WeekYear;
Thank you a lot. It worked
Hi
Try like this
Try this:
Table1:
LOAD WeekYear,
Value
FROM datasource;
Left Join (Table)
LOAD WeekYear,
Sum(Value) as [TotalValue/Week]
Resident Table1
Group By WeekYear;
Create the Straight Table with
Dimension:
1) WeekYear
2) Value
Expression:
sum(TOTAL <WeekYear> Value)