Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a script like this:
LOAD SHOPID,
KostenartID,
Date,
Key,
ValueIst,
ValueForecast,
ValuePlan2015
FROM Table1;
And the result will be a table with too many rows, because the values (last 3 columns) are located in different rows.
The first 4 colums have the same keys. Now I do not want to load 3 rows but 1 row, because the keys are the same.
How can I change the scriot to get a table like this
Thanks in advance
BR
Thomas
Hi
Assuming that the 'other' row's values are always 0 or null, then you could do this:
LOAD SHOPID,
KostenartID,
Date,
Key,
Sum(ValueIst) As ValueIst,
Sum(ValueForecast) As ValueForecast,
Sum(ValuePlan2015) As ValuePlan2015
FROM Table1
Group By
SHOPID,
KostenartID,
Date,
Key;
HTH
Jonathan
Hi Thomas
use them in expression not in dimension.
and use the avg or sum formula, as it suits you
Regards
harshita Gaur
Hi
Assuming that the 'other' row's values are always 0 or null, then you could do this:
LOAD SHOPID,
KostenartID,
Date,
Key,
Sum(ValueIst) As ValueIst,
Sum(ValueForecast) As ValueForecast,
Sum(ValuePlan2015) As ValuePlan2015
FROM Table1
Group By
SHOPID,
KostenartID,
Date,
Key;
HTH
Jonathan
Try this;
LOAD SHOPID,
KostenartID,
Date,
Key,
sum(ValueIst) as ValueIst,
sum( ValueForecast) as ValueForecast,
maxstring( ValuePlan2015) as ValuePlan2015
FROM Table1
group by
SHOPID,
KostenartID,
Date,
Key
;
Good Luck
Hi,
Use sum(valueforecast) and other 2 in expression. But suppressing at script level is best.
Regards,
Navdeep