Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table like this:
TEMP:
Date, Name, Value
01/01/2020, Test, 10
01/01/2020, Test2, 20
02/01/2020, Test, 30
02/01/2020, Test2, 40
And I need to sum values of Test and Test2 and generate a new row per Date, like this:
FINAL_TABLE:
Date, Name, Value
01/01/2020, Test, 10
01/01/2020, Test2, 20
01/01/2020, Test+Test2, 30
02/01/2020, Test, 30
02/01/2020, Test2, 40
02/01/2020, Test+Test2, 70
How can I do this in the script?
@rafakmargos try below
Data:
load Date,
Name,
Value
FROM Source;
Concatenate(Data)
load Date,
'Test+Test2' as Name
sum(Value) as Value
resident Data
where match(Name,'Test','Test2')
group by Date;
@rafakmargos try below
Data:
load Date,
Name,
Value
FROM Source;
Concatenate(Data)
load Date,
'Test+Test2' as Name
sum(Value) as Value
resident Data
where match(Name,'Test','Test2')
group by Date;
@Kushal_Chawda it worked. Thank you very much!