Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
dan205
Contributor III
Contributor III

Can you sum several dimension values in a bar chart?

Let's say I have a simple bar chart like the example from the Qlik help, where the dimension is country and the measure is an expression (e.g. price*quantity):

ui_gen_BarChart.png

Is it possible to include another bar on the same chart that shows the total for UK, Spain and Germany? 

Thanks in advance,

Dan

Labels (3)
3 Replies
Chanty4u
MVP
MVP

Try this 

Sum({<Country = {'UK', 'Spain', 'Germany'}>} Price * Quantity)

vinieme12
Champion III
Champion III

 

Create a new field with custom grouping to use as dimension in chart

 

Then use Country_dim as chart dimension

 

CountryGrouping:

Load Distinct Country as Country, Country_dim

From FactTable;

Concatenae(CountryGrouping)

Load Distinct Country as Country, 'EUROPE' as Country_dim

From FactTable

Where wildmatch(Country,'UK','Spain','Germany') ;

 

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
dan205
Contributor III
Contributor III
Author

Thanks @Chanty4u and @vinieme12 - I've been put on another project but I will try both of those solutions at the earliest opportunity and report back. 

Dan