Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a field called "Country" which has values [germany,italy,spain,france,UK,US] and sales field
i want to create one more field value called " Europe" in country which will have sum of values for germany italy spain france.
how to achieve this?
Try this:
Raw:
load
* inline [
Region,Sales
Germany,100
Italy,100
Spain,100
France,100
UK,100
US,100
];
Concatenate(Raw)
Data:
load 'Europe' as Region,sum(Sales)as Sales
resident Raw
where match(Region,'Germany','Italy','Spain','France');
Try this:
Raw:
load
* inline [
Region,Sales
Germany,100
Italy,100
Spain,100
France,100
UK,100
US,100
];
Concatenate(Raw)
Data:
load 'Europe' as Region,sum(Sales)as Sales
resident Raw
where match(Region,'Germany','Italy','Spain','France');
concatinate(OldTable)
load * inline [
Country,Sales
Europe,1000
];
//Write this code below of existing just do concatinate
Sanju, do not forget to come back to the thread and mark any posts that helped you with things by using the Accept as Solution button on those posts. If you are still working on things and need further assistance, please leave an update as to where things stand.
Regards,
Brett