Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have few values in list box as below:
Names |
---|
India |
Bangalore |
Cochin |
India |
Hyderabad |
Pune |
Mumbai |
Pune |
Mumbai |
as seen in the list box, there are duplicates like india, pune and mumbai so i need only these three names to be suffixed by India_S, Pune_S, and Mumbai_S
so my list box will be like this :
Names |
---|
India |
Bangalore |
Cochin |
India_S |
Hyderabad |
Pune |
Mumbai |
Pune_S |
Mumbai_S |
please help
Regards
srujana
So the second instances of India should be renamed to India_S? how about the third or 4th instance?
Hi,
like this?
DATA:
LOAD * Inline [
CITTA
India
Bangalore
Cochin
India
Hyderabad
Pune
Mumbai
Pune
Mumbai
];
NoConcatenate
DATA_2:
LOAD
CITTA
Resident DATA
Order BY CITTA;
DROP Table DATA;
NoConcatenate
DATA_3:
LOAD
CITTA,
IF(Previous(CITTA)=CITTA, CITTA&'_S', CITTA) AS CITTA_NEW
Resident DATA_2;
drop Table DATA_2;
no i dont have 3rd and 4th instance lie that..they r repeating twice only.....
Perhaps it's better to remove the duplications maybe per mapping.
- Marcus
i cant remove the duplicates as i need to show like that. and i cant use an inline load as well. as i have only these three names duplciate and i need to add suffix _S . Is there any expression can we write anything.
I use an inline because I don't have your data source...
Do you need an expression for the front end?
With removing the duplications within the listbox wasn't meant to remove the data behind them else only to clean the listbox-field. Normally there shouldn't be such duplications - and even if you want to keep them you will need why they exists and which from these values should be flagged with an addtional 'S' to find a stable solution.
- Marcus
Hi,
maybe one solution could be:
LOAD Names&If(Exists(Names),'_S') as Names
FROM [https://community.qlik.com/thread/243075] (html, codepage is 1252, embedded labels, table is @1);
(you would replace the inline load with your actual load statement)
hope this helps
regards
Marco
thank u for helping me.
the duplicates are coming from say for example i have a reqwuirement like:
if (flag = 'XYZ', then append _S to India, Pune and Mumbai)
so how can i achieve this on the front end side.