Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
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.
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		 
					
				
		
 oknotsen
		
			oknotsen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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?
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Dimension: School Name
Expression: Sum(FieldName)/Sum(TOTAL FieldName) or Count(FieldName)/Count(TOTAL FieldName)
 
					
				
		
Hi Onno, Thank you for your response. I will try to send you a sample file.
 
					
				
		
 oknotsen
		
			oknotsen
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		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.
. 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  .
.
 
					
				
		
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.
 
					
				
		

 
					
				
		
=count({<schoolname={'nursing'}>schoolname})/count(TOTAL schoolname)
 
					
				
		
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!!
 
					
				
		
Also dont forget to change the format i.e show in percent under Number tab
