Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

creating 100% grouped bar per country

Hi guys,

I have a bar chart that give the percentage of shipments that are ontime or late per country.

the bar chart calculates the percentage of ontime/late based on all the countrycodes in the bar chart. Only when I click on a certain country e.g. 'AE' I see the the 'total percentage' of a specific country.

Is there a way to do this for all the country, without having to click on a certain country?

I have 2 dimensions:

CountryCode

Status

My expression is: count(shipmentid) / count(Total shipmentid)

Thanks in advance!

Isam

I've attached a screenshot with what I'm trying to achieve.

Regards,

iSam

1 Solution

Accepted Solutions
Not applicable
Author

Hi iSam, you can use count(Order) / count(Total <Ctry> Order) to get the 100% bar per country

View solution in original post

9 Replies
Sokkorn
Master
Master

Hi iSam,

Can you attached a small application? So that it can easy to solve your issue.

Regards,

Sokkorn Cheav

Anonymous
Not applicable
Author

Hi,

I've attached a sample of my qlikview document.

Regards,

Isam

Sokkorn
Master
Master

Hi ISam,

I will reply you back by tomorrow. Coz I need to go now.

Regards,

Sokkorn Cheav

Anonymous
Not applicable
Author

Thanks looking forward for your reply J

Not applicable
Author

Hi iSam, you can use count(Order) / count(Total <Ctry> Order) to get the 100% bar per country

Anonymous
Not applicable
Author

Hi Sajeevan,

That indeed did the job! Thanks for your help!!

iSam

Not applicable
Author

Thanks, please mark the posting as answered

Sokkorn
Master
Master

Hi iSam,

Here is the second solution

Create <Bar Chart> with

1. Ctry as Dimentions

2. Two Expression

    . COUNT({$<Status = {'Late'}>} Order) / count(Order)          with Label <Late>

    . COUNT({$<Status = {'OnTime'}>} Order) / count(Order)     with Label <OnTime>

See the attached file also.

Regards,

Sokkorn Cheav

Anonymous
Not applicable
Author

Hi Sokkorn,

Thanks for sharing your solution!!

Regards,

iSam