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.
I don't think TOTAL is required here, you can just use (and note the missing curly bracket in red)
=Count({<schoolname={'nursing'}>} schoolname)/Count(schoolname)
and if you are doing this in a straight table with schoolname as your dimension, then try this:
=Count(schoolname)/Count(TOTAL schoolname)
From my point of view, I think Total is required.
The reason behind this is: If I am having any measure field like Sales, NoOfFaculty then I need to group w.r.t Dim like
=sum(<Total SchoolName> NoOfFaculty)
Here is any example to show that TOTAL is not required
Did you try what I suggested you??
Replace FieldName with Score or Course...
Thank you all for your answers and special thank for dear Sunny
No problem
Sunny,
For me School is a Dim not a measure, Even you would be agree on same.
Now If I want to see score % then:
I would go for this:
=sum(<School={'Nursing'}>} Score) / sum(<Total School> Score) which would give Nursing % wrt to total.
This is what I am trying to say...
Balraj, there are couple of things
1) Your syntax for the expression is not right:
=Sum({<School={'Nursing'}>} Score) / Sum(Total <School> Score)
2) I am not sure which object would need this expression? Would you be able to implement your expression into previously attached qvw?
Thanks,
Sunny
Oops, wrong syntax...sorry for the inconvenience.
I was saying like this:
=Sum({<School={'Nursing'}>} Score) / Sum(Total Score)
Balraj Ahlawat wrote:
=Sum({<School={'Nursing'}>} Score) / Sum(Total Score)
Show an implementation of this then. I still don't think you need TOTAL in denominator.