Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following data in my Qlikview data model. I need to find the attendance of the student belonging to CME.
I can get the numerator (I use set analysis and filter by QuestionType (CME) and QuestionData (1)) but not the denominator.
Denominator: I need to count the total number of rows that belong to each student under QuestionType (CME).
Example. I should get 3 counts for student A belonging to CME. Any one can help on this?
Thanks!
Chun Wey
There should be no difference between sum() and count() if if the data is "1". I just find count() easier in this case to avoid the if().
To also filter on the QuestionType, add a Set expression.
Sum({<QuestionType={CME}>}-IsNum(QuestionData))
-Rob
count(if(Upper(qdata)=Lower(qdata),1))
Try that.
PFA.
How about
Sum(-IsNum(QuestionData))
-Rob
Hi Rob, Ramkumar,
Thanks for your responses.
I mange to do this as I need to further filter by questiontype. Have to do a count instead of sum as I am counting the no of records belonging to numeric values. Only concern here is the performance as I am using IF statement .
COUNT(IF(QuestionType='CME' AND IsNum(QuestionData)=-1,1))
Thanks for your help. However, if you have better suggestion on the above expression, will be more happy to know.
Rdgs,
Chun Wey
Thank you
There should be no difference between sum() and count() if if the data is "1". I just find count() easier in this case to avoid the if().
To also filter on the QuestionType, add a Set expression.
Sum({<QuestionType={CME}>}-IsNum(QuestionData))
-Rob