Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hi, community

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.

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

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.

View solution in original post

16 Replies
Not applicable
Author

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 ......................... ;

Not applicable
Author

and what if , i want to update more id..,can u pls suggest me without using if

jagan
Partner - Champion III
Partner - Champion III

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.


Not applicable
Author

i want to show it in straight chart, so when i click on c so it should show a date as 1/1/2014

Anonymous
Not applicable
Author

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?

Not applicable
Author

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.

Anonymous
Not applicable
Author

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);

jagan
Partner - Champion III
Partner - Champion III

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.

Not applicable
Author

hey i jus got confused which diemnsion i have to take , in this and expression also...to create straight chart.