Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
mnvrma
Partner - Contributor III
Partner - Contributor III

Sum function is not working well

Calc_New:Screenshot (34).png

 

I want to (Sum of Flag) by (GroupQuestions) Field but

for Name:Akshay Karbhal (No of GroupQuestions coming 4 which is correct as Sum of flag is 4 by questiongroup) but for Name:  Dan Ulmamei its coming 8 instead of 4.

Load
Name,
QuestionGroup,
Sum(Flag) as "No Of GroupQuestion"
resident Calc
Group By Name,QuestionGroup;

1 Reply
sunny_talwar

Is it possible that some of your data is getting duplicated? The only reason for seeing 8 would be if you have the each row for Dan repeating 2 times. You might be able to resolve this using Count(DISTINCT Questions) instead of Sum(Flag), but the underlying problem of duplication can still cause issues at other places.