Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Two dimensions in Bar Chart

Hi,

I have countries and cites in two fields. and want to have a graph with countries and cities as dimensions and sales as expression.

I want to have a bar chart with both dimensions in  X-Axsis. I have created calculated dimension as  1 and then i can do that.

But my x-asis shows all the cities for all counties.

Eg- I have two countries, USA and ENGLAND

and cities as Newyork, Florida, London , Liverpool.

so my x axis show Newyork, Florida, London , Liverpool  for both cities.

But i want to have it as Newyork, Florida under USa and London , Liverpool under London

26 Replies
Chanty4u
MVP
MVP

u can use grouping...

anuradhaa
Partner - Creator II
Partner - Creator II
Author

In Script?

Anonymous
Not applicable

If you are having relationship b/w Country and City, then you can create a Drill Group of both Dimension.


like Country->City

Is this sufficient?

tresesco
MVP
MVP

Create a dummy expression (say, =1) and then make it invisible, you would get your second dimension values grouped on axis.

Chanty4u
MVP
MVP

in bar chart..u hve to create drill down group.. country---> city

by that it will helps you

Thanks

Suresh

jagan
Luminary Alumni
Luminary Alumni

HI,

Do you have mapping between Country & City, if not derive a mapping table like belo

LOAD

*

INLINE [

City, Country

Newyork, USA

Florida, USA

London , London

Liverpool, London];


Now use Country and City dimensions.  Hope this helps you



Regards,

Jagan.

Anonymous
Not applicable

See the attached Image,

In Dimension Tab of Chart,

Click on Edit Group->New->Select DRill Group from Top Left->Give The Name of Group->Add dimension, in your case , 1st Dim is Country then City->ok

And then add this drill group name as a dimension in your chart..

anuradhaa
Partner - Creator II
Partner - Creator II
Author

I Have done it, but the problem i have is all the 2nd dimenssion  values available under both 1st dimenssion

anuradhaa
Partner - Creator II
Partner - Creator II
Author

drill down doesn't show both dimenssion in one time