Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum(), Count() issue in chart

I am facing a strange issue and I am unable to find the cause of it.

I have a table which records the responses of many students to a set of questions and its with many rows..and am making a dashboard to analyse the count of each type of answers given by stsudents to questions.

few of the rows are Question number, Question Text, Answer, Ans_Counter

So many rows in the table gets loaded with null values.

I load the table to QVW file. and in the qvw file, I create a table chart..pulling all fields from this table and display..to test, i export it to excel and give filters there in excel..select in question filter, question_no 23 (this has 4 possible answers--> good, fair, poor, very poor) ..that result in a set of rows..again i put the answer filter as 'good' and i get a count..the count of responses that are 'good' for question_no 23..lets say the count be C

Now I create simple bar chart with Answer as the dimension and Count({<question_no='23'>}Answer)

But here, the count shown for 'good' is not at all matching with C

I thought it might be some issue with Count() fn, and I used a Ans_Counter to try out the same thing using sum(), as

Sum({<question_no='23'>}Ans_Counter) But the count still doesnt match

Anyone have any clue??

6 Replies
Not applicable
Author

typo .. i meant table box, not table chart !

Not applicable
Author

sum and count are used in expressions, that are available in every chart but not in table box.

You can use straight table chart and use the same expression with the required dimension. And it will work.

In some cases, the word DISTINCT can be used in order to count only distinct values(non-repeated).

Regards.

Not applicable
Author

@Saad,

I am not using sum/count in table box.

What I told was.. for testing purpose.. I create a table box having all columns for this internal table..export the values to excel..and apply filters in excel to cross compare with the bar chart I create in qlikview for the same table.

But these are not matching..

martinpohl
Partner - Master
Partner - Master

Hello,

did you use one fact table or many?

The result in a table box is the result of all matches, especially in the join of two table by one field and the fields of both tables.

Are the result in QV higher or lower than in excel?

Regards?

Not applicable
Author

Using only one fact table.

The result in QV is much higher than what i get from excel

Nicole-Smith

Since your results in QV are much higher, I would suggest taking a closer look at your load script.  I had a similar issue and it was with the way my tables were linked.