Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
dears!
I have a column in a table called city, This column has more than 100 distinct values. using city column as a dimension,
when i create a stacked bar chart, since there are many of them(cities). I cannot see much of that in the chart and it gets so messy.
is it possible to break a dimension with 100 possible values into 5 groups of dimensions each has 20 values?
Thanks for your help in advance.
cool then let him answer
Thanks everyone for your help. I thought there's a way to break down a dimension in Qlickview. but apparently there isn't.
I am adding another column to the table in database. and assign values Group1,Group2,...Group6 to cities. in this way i can separate them.
there is no better way? Right?
I think your way would be the best one. Like that, you do not need to hardcode it in the script and if any new groups are going to be added you will add them into your database
You can always hardcoded in your script by using nested if statement or PICK() function will solve it too.
IF nested:
if(mixmatch(City, 'Paris','Barcelona'),'Group1',
if(mixmatch(City,'Tokio'),'Group 2',
if(mixmatch(City,'New York'),'Group 3',
'Group 4'))) as City_Groups
Pick function:
Pick(Wildmatch((City),'Paris','Barcelona','Tokio','New York'),
'Group 1', 'Group 1','Group 2','Group 3')
as City Groups
actually i got the answer but i need to make the groups having hiearchy to show the city names beside the groupname like
group1-->newyork,tokyo
group2-->paris,london
group3-->sydney is there any chances can i get like this