Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
Please find the sample data in the attachment. Will it be possible to analyze Country wise data in the given scenario?
Deepak
Give it a try with a script like
// ==== Load all the data, add one column for country-data ====================
RawData:
LOAD
IF(WILDMATCH(@1, '*COUNTRY :*'), @1, PEEK(xCountry)) AS xCountry,
@1,
@2,
@3
FROM
[.\CountryData.xls]
(biff, no labels, table is Sheet1$);
// ==== Delete headerinfo, cleanse country-data ==============================
Data:
LOAD
TRIM(MID(xCountry, 10, 100)) AS Country,
@1 AS Product,
@2 AS Qty,
@3 AS Amount
RESIDENT
RawData
WHERE
NOT WILDMATCH(@1, '*COUNTRY :*', '*PRODUCT*');
DROP TABLE RawData;
HTH
Peter
Give it a try with a script like
// ==== Load all the data, add one column for country-data ====================
RawData:
LOAD
IF(WILDMATCH(@1, '*COUNTRY :*'), @1, PEEK(xCountry)) AS xCountry,
@1,
@2,
@3
FROM
[.\CountryData.xls]
(biff, no labels, table is Sheet1$);
// ==== Delete headerinfo, cleanse country-data ==============================
Data:
LOAD
TRIM(MID(xCountry, 10, 100)) AS Country,
@1 AS Product,
@2 AS Qty,
@3 AS Amount
RESIDENT
RawData
WHERE
NOT WILDMATCH(@1, '*COUNTRY :*', '*PRODUCT*');
DROP TABLE RawData;
HTH
Peter
Thanks ... It worked fine. But I need to apply it in Live scenario which is more complicated.
Important part is I got a start. Thanks...!!!