Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using QLIK SENSE, but I'm having some difficulties, so please help.
data:load * inline[region_number, populationaaa/111, 988aaa/222, 654aaa/333, 651bbb/111, 241bbb/222, 755bbb/333, 123];
I want to add a new field to display the regionswith the most population in the same region.The answer I want is below.
region_number, population, maxaaa/111, 988, vaaa/222, 654 aaa/333, 651bbb/111, 241bbb/222, 755, vbbb/333, 123
if ~ blahblah ~ 'v' as max,
Please let me know how to solve it.
Thank you.
Hi
Try like below
data:load *, SubField(region_number, '/',1) as region inline[region_number, populationaaa/111, 988aaa/222, 654aaa/333, 651bbb/111, 241bbb/222, 755bbb/333, 123];
joinLoad region, max(population) as Max Resident data Group by region;
Final:LOAD region_number, population, if(Max = population, 'v') as Max Resident data;
DROP Table data;