Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to replace ID with membername at a time?


Hi,

I have ID and membername. whereever there is ID I have to show membername in straight table . I am aware it will get by using

If(ID=1, 'XX',ID) as ID

I have to replace 300 rows with membername instaed of ID.

Is there any way I can do this with script at a time or with expression?

Thanks.

17 Replies
Gysbert_Wassenaar

You could simply load the list of ID's and member names and use the member name dimension instead in the straight table. Or you could use a mapping table and the applymap function to replace ID's with member names.


talk is cheap, supply exceeds demand
brindlogcool
Creator III
Creator III

You can use ApplyMap in load script . If id and Membername is in data model then you should be able to display it in the straight table without any script.  Hope i have not missed anything

juleshartley
Specialist
Specialist

See here for example

Not applicable
Author

Thanks and I don't have ID and memebername in both tables. that is the main problem now. I tried using APPLYMAP but it is not showing values accurate.

TableA has only ID

TableB has ID and memebername.

In this case how can I use this?

Gysbert_Wassenaar

MapName:

mapping load ID, MemberName

from TableA;

TableB:

load ID, applymap('MapName',ID) as MemberName, ...other fields ...

from TableB;


talk is cheap, supply exceeds demand
brindlogcool
Creator III
Creator III

So you want to update the Table A with Member Name? It should work.Please refer this example. Can you attach your file if possible

brindlogcool
Creator III
Creator III

Please refer the example Julian has provided

Not applicable
Author

Thanks and sorry it's not working when I reload it is showing field not found membername.

actually I have in TableA    ID

and in TableB    PID,membername

Gysbert_Wassenaar

Use the exact case sensitive names. Qlikview is case sensitive so MemberName is not the same as membername. Because I don't have your document I cannot know the exact field names you need to use.


talk is cheap, supply exceeds demand