Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have three columns inwhich id , updatedid, and date is given,
in the id field c it is updated as a , so it should show c as a's respective date , same for f also in my output ,
can u guys pls help me out in this issue, pfa excel of input.
Thnaks in advance.
Hi,
Try like this
Temp:
LOAD
id,
Pick(Match(id, 'c', 'f', id), 'a', 'b', id) AS updatedid,
date
INLINE [
id, updatedid, date
a, , 1/1/2014
b, , 2/1/2014
c, a, 3/1/2014
d, , 4/1/2014
e, , 5/1/2014
f, b, 6/1/2014
g, ,
];
NoConcatenate
Data:
LOAD
id,
updatedid,
date,
If(previous(updatedid) = updatedid, Previous(date), date) as updateddate
RESIDENT Temp
ORDER BY updatedid, date;
DROP TABLE Temp;
Regards,
Jagan.
just add a calculated dimension and say
=if (id='c', 'a', if (id='f','b'))
Change the label to
Update ID
if you want to do that in a script just write like this.
load if (id='c', 'a', if (id='f','b')) as [Update ID], *;
load ......................... ;
and what if , i want to update more id..,can u pls suggest me without using if
Hi,
Try like this
load
*,
Pick(Match(id, 'c', 'f'), 'a', 'b') AS [Update ID]
FROM DataSource;
If you have more values to compare then add the values in Match and Pick() easily.
Regards,
Jagan.
i want to show it in straight chart, so when i click on c so it should show a date as 1/1/2014
Hi,
I didn't understand your question exactly. Do you want to show date as per updatedid and if it null/blank than show as per id?
when i select c then it should show ,A's date.
id updatedid date
c ---> a 1/1/2014 same for f also , without using if.
Hi,
Something like below,
MappingDate:
Mapping
LOAD id,
date
FROM
New Microsoft Office Excel Worksheet.xlsx
(ooxml, embedded labels, table is Sheet1);
Data:
LOAD id,
updatedid,
date,
Date(ApplyMap('MappingDate',updatedid,date)) as updated_date
FROM
New Microsoft Office Excel Worksheet.xlsx
(ooxml, embedded labels, table is Sheet1);
Hi,
Try like this
Temp:
LOAD
id,
Pick(Match(id, 'c', 'f', id), 'a', 'b', id) AS updatedid,
date
INLINE [
id, updatedid, date
a, , 1/1/2014
b, , 2/1/2014
c, a, 3/1/2014
d, , 4/1/2014
e, , 5/1/2014
f, b, 6/1/2014
g, ,
];
NoConcatenate
Data:
LOAD
id,
updatedid,
date,
If(previous(updatedid) = updatedid, Previous(date), date) as updateddate
RESIDENT Temp
ORDER BY updatedid, date;
DROP TABLE Temp;
Regards,
Jagan.
hey i jus got confused which diemnsion i have to take , in this and expression also...to create straight chart.