Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
AriIt
Contributor II
Contributor II

Stacked bar chart without dimensions

Hello guys!

I need to make a stacked bar chart but I don't have the dimension.

On the X-axis I need to put for example: London, England, Europe (so 3 bar), and on the Y-axis: 'Provided per user', 'Provided per user (England)', 'Provided per user ( Europe)' and 3 more measures: 'Provided per capita', 'Provided per capita (England)', Provided per  capita (Europe)'.

Thanks for your reply!

1 Reply
QFabian
MVP
MVP

Hi @AriIt , you can create your own dimensions and values, with INLINE tables, like this :

[Country (per user)]:
load * INLINE [
Country (per user)
London
England
Europe
];

[Country (per capita)]:
load * INLINE [
Country (per capita)
London
England
Europe
];

And then in chart bar chart, you can use both fields as dimensions :

QFabian_0-1614784618947.png

 

And for specific values in each bar segment, you can add that data directly in the inline tables, or do some more caluclations, for example :

if([Country (per capita)] = 'London' and [Country (per user)] = 'London', sum(OthertField),
if([Country (per capita)] = 'London' and [Country (per user)] = 'England', count(distinct [Country (per capita)]),
etc, etc))

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.