Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How can we merge values of a field in script. For ex;
Disease
A
B
C
D
and here i want 2 values c & d to get merged into 1 value nd named as others?
Please help.
LOAD Area,
Revenue,
Disease,
if(Disease='A' OR Disease='B','Disease',
if(Disease='C' OR Disease='D','Others')) as Others
FROM xyz.xlsx
This should be it!
Greetings,
Lucas
if(diseasse ='c' or disease='d','others',disease) as disease
then u have to resident load and group by disease and use sum(revenue).
-Sundar
It is working with:
if(Disease='AML' OR Disease='CLL','Others',Disease) as Disease.
Thanks a lot everyone
LOAD
Area,
Revenue,
if(Disease='A','A',
if(Disease='B','B',
if(Disease='C' OR Disease='D','Others'))) as Disease
FROM
Ex.xlsx
(ooxml, embedded labels, table is Sheet1, filters(
Remove(Row, Pos(Top, 10)),
Remove(Row, Pos(Top, 9)),
Remove(Row, Pos(Top, 8)),
Remove(Row, Pos(Top, 7)),
Remove(Row, Pos(Top, 6))
));
I tried this, and it works
Greetings,
Lucas
no problem, that's what we're here for
Hi Aakansha
Try this code:
LOAD if(WildMatch(Disease,'C','D'),'Others',Disease) AS Disease,
if(WildMatch(Disease,'C','D'),'',Area) AS Area,
Sum(Revenue) AS Revenue
FROM
[..\Example.xlsx]
(ooxml, embedded labels, table is Sheet1) Group By Disease,Area;
This will probably fix your issue.
Further see the Attachment.
Regards
Aviral Nag