Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ratio calculation

Hi every one. I am new in Qlik and want to ask a question. I have a set of data with 5 variable. one of them is school name. In this variable how can I calculate ratio of one school vs all others.

1 Solution

Accepted Solutions
sunny_talwar

Here is any example to show that TOTAL is not required

Capture.PNG

View solution in original post

26 Replies
oknotsen
Master III
Master III

I guess you mean fields instead of variables.

Can you post an example of the data you have, so we can give you a good example of a calculation in return?

May you live in interesting times!
sunny_talwar

Dimension: School Name

Expression: Sum(FieldName)/Sum(TOTAL FieldName) or Count(FieldName)/Count(TOTAL FieldName)

Not applicable
Author

Hi Onno, Thank you for your response. I will try to send you a sample file.

oknotsen
Master III
Master III

Don't try to send me something . See if you can post a simply screenshot or a table of a small data dump (5 rows, related columns) in a reply.

Unless of course what Sunny posted below already solves it .

May you live in interesting times!
Not applicable
Author

Hi Sunny. First of all thank you for  your answer but in my case filed names are same like below sample.

name  sname  schoolname  age   sex

j           g           medical         25      M

a            c          nutrition         22      F

b           d           nursing          23      M

and so on. now I want to calculate ratio of nursing vs total of schoolname.

Not applicable
Author

Not applicable
Author

=count({<schoolname={'nursing'}>schoolname})/count(TOTAL schoolname)

Anonymous
Not applicable
Author

try like this:

=sum({<schoolname={'nursing'}>} FieldName)    //will give for nursing only

/

sum(<Total schoolname> FieldName)   //will give for all school

Hope this will help!!

Anonymous
Not applicable
Author

Also dont forget to change the format i.e show in percent under Number tab