Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with percentage calculation in Trellis charts

Hey all

I have a problem with calculation percentage in Trelllis charts.

I want to show the enrollment of Bachelor- and Masterstudents in 8 different Universities in Denmark in a Trellis chart. I have no problem showing the actual number in my first Trellis Chart, but I also want a Trellis Chart where I have calculated the ration (in %)of all Bachelorstudents enrolled in each University divided by all enrolled Bachelorstudents in Total. The data ratio should sum to 100% in each of the Years in the Chart (2007-2013) . Likewise I want the same percentage for Masterstudents in the Chart (called "Kandidat" in Danish).

I use these dimensions/expression:

Dimensions:

  • University
  • Year
  • Type (Bachelor/Master)

Expression:

=sum({$<Status={'Samlet'}, Type={'dkuni, optag'}>} sum) / sum({$<Status={'Samlet'}, Type={'dkuni, optag'}>} TOTAL sum)

Listbox (where I select from Faculties - in the case in the Picture underneath it is "Humaniora" which 6 Universities have)

However my Trellis Charts looks like this:

QV forum mar14.png

Clearly the percentages are not calculated correctly - what am I doing wrong?

I have attached my data in excel-format

Hope somebody can help - thanx

Cheers

Bruno

 


11 Replies
Not applicable
Author

By bad - I didn't see Manish answer and thought that there was something called a "Manish Expression" in Qlikview (guess WHO's feeling like a complete fool now )

Thanks a lot both of you - You solved my problem!

Cheers

Bruno

MK_QSL
MVP
MVP

My pleasure ...!!