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: 
Anonymous
Not applicable

Stacked Chart by country in %

Hi everyone,

Help me to build a chart for the last month.    

I have variables country which includes many countries, MYear and context variable which show in percentage.

I need to show in chart Global (all countries) and by each country.

I think it's not possible to show in QV in one chart. I have QV 11.

Thanks,

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

In Dimension Limits Tab check Show TOTAL.

It shows TOTAL.

View solution in original post

12 Replies
swuehl
MVP
MVP

Not sure if there is a special new fetaure with QV11, but I think you could do it like described e.g. here:

http://community.qlik.com/message/92253

Anonymous
Not applicable
Author

Hi Stefan,

I created a new variable which includes only selected countries.I build them one by one in different charts. But I think I miss something that not allow to build them in one chart.

Thanks,

swuehl
MVP
MVP

I'm not sure if I understand. How do you build your new variable from the different charts?

Anonymous
Not applicable
Author

Please find my attached file.

Regards,

Anonymous
Not applicable
Author

Hi ther,

Who knows how can I add TOTAL?

I have expression in script

      If(Value='A','A',If(Value='B','B',If(Value='C','C',If(Value='D','D',If(Value='E','E')))))as Value1

I need to add TOTAL in Value1.( A,B,C,D,E)

Thanks,

swuehl
MVP
MVP

I just applied above linked solution to your data, please have a look at attached.

I then used the CountryGroup as dimension in a new bar chart, on second sheet. I am not sure what you want to do with the calculation, it seems that you are using some fields in the set expression that don't exist (in this sample). So I just removed the limitation on Country field.

I would suggest that you use a Country field value like 'Others', not NULL() for Countries that don't match your three classes. And if you don't want these multiple if() statements, you could use a pick/ match combination, maybe like:

pick( match([qID_6317_In which of the following countries do you reside?],'Canada','United States', 'United Kingdom', 'Germany')+1, 'Others','US/Canada','US/Canada','UK','Germany')) as Country,

or use a mapping table (please refer to the HELP, search for MAPPING load prefix and applymap() function.

Hope this helps,

Stefan

Anonymous
Not applicable
Author

Hi Stefan,

I played with your syntax. I tried also to found out myself something. I tried to reload in another table and combine them. But without results. I attached my report. I hope it helps to understand what I need .

In my case I think usual stuff doesn't work. I need to use trick or magic.

Thank you for your help,

swuehl
MVP
MVP

I haven't seen in your sample that you used a code similar to what I posted and reference above, so I am not sure if we are looking for the same. I tried to adapt your code to what I think you are after, find attached.

Anonymous
Not applicable
Author

I need to add variable Global(US, Canada, UK, Germany , Australia, India, ...) in my Country and keep US/Canada, Germany, UK.

Because I use Country as Dimension. Maybe is wrong way? Maybe I need to use aggr or sum of country.

But I don't know how it works and it will hepl me in my request.

Thank you