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

Interesting chart problem

I have Regions that have multiple Countries. I also have applications that are used by multiple counties across regions.

I need a chart that will show per Application what is the percent of countries using it in each  region.

For Instance APP 1 is used in 10% of countries in Region 1,

25% in countries for Region 2 and so on

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Hi,

it is correct regarding the current selection, but of course incorrect regarding your requirement.

you need to add a {1} to disregard the current selection:

=count ( distinct Country) / count ({1} distinct total <Region> Country)

the syntax means:

per App and region

count associated distinct  Countries and devide by the total number of countries in that region.

If we use count( distinct total Country), we would disregard the charts dimension App and region, with count( distinct total <Region> Country), we disregard App Dimension, but not Region dimension.

Syntax looks like set analysis because of <>, but just indicates the fields (please have a look at the count function in manual for more details).

Hope this helps,

Stefan

Nachricht geändert durch swuehl

View solution in original post

5 Replies
Not applicable
Author

write an expression 1- (SUM(Total Application)/ Count(Region))

if I understood your problem correctly.

swuehl
MVP
MVP

If your 1. dimension is App and second Region, I think it could be something like

count ( distinct Country) / count (distinct total <Region> Country)

see also attached sample for discussion.

Regards,

Stefan

Not applicable
Author

It looks like it is correct when you open your example. For App1 in Europe distribution is 75% which is correct. However if you click on App1 for instance the chart becomes 100% for each region which is not correct.

Can not figure out the problem.

Also in your code what is <Region>syntax mean? . the syntacs os a set analysis however you do not have {}

swuehl
MVP
MVP

Hi,

it is correct regarding the current selection, but of course incorrect regarding your requirement.

you need to add a {1} to disregard the current selection:

=count ( distinct Country) / count ({1} distinct total <Region> Country)

the syntax means:

per App and region

count associated distinct  Countries and devide by the total number of countries in that region.

If we use count( distinct total Country), we would disregard the charts dimension App and region, with count( distinct total <Region> Country), we disregard App Dimension, but not Region dimension.

Syntax looks like set analysis because of <>, but just indicates the fields (please have a look at the count function in manual for more details).

Hope this helps,

Stefan

Nachricht geändert durch swuehl

Not applicable
Author

Thanks a lot