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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Bar Chart in a Report with different selections

Dear All,

I have a simple data structure like country, citym, sales ammount.

With it I have a bar chart with sales per city and a List Box with the countries. For each country selected I can see the sales per city.

i need to generate one report showing the Bar Chart. One Bar Chart per country each one in one page (I mean: If I have three countries, the report will have three pages and in each one the chart with sales per city of the country).

Is it possible?

Thanks in advance.

Best Regards,

André Rodrigues

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Look into the banding options in your report properties. This will loop over all values in your country field and create a report per value. I think that's what you need here.

Regards,

Stefan

View solution in original post

4 Replies
swuehl
MVP
MVP

There are multiple ways to do this:

Use a calculated dimension (with option 'suppress if value is null' checked in dimension tab):

=if(country = 'country1', city)

and as expression

=sum([sales amount])

or create a chart with dimension city and an expression with a conditional

=sum(if(country = 'country1', [sales amount]))

or create a chart with dimension city and an expression with a so called set expression (like a selection only done for this chart):

=sum({<country = {'country1'}>} [sales amount])

I would probably do it the last way. Create three charts, for country1, country2, country3.

Hope this helps,

Stefan

Anonymous
Not applicable
Author

Stefan,

Thanks the help but when I say a report, I mean a pdf report and in fact I´m looking for a solution to create as many charts as countries I have in the field.

What I want to avoid is to have to delete or create a chart if I have less or more countries.

Thanks again and regards,

André

swuehl
MVP
MVP

Look into the banding options in your report properties. This will loop over all values in your country field and create a report per value. I think that's what you need here.

Regards,

Stefan

Anonymous
Not applicable
Author

Great Stefan,

Thanks !!!