Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
mnvrma
Partner - Contributor III
Partner - Contributor III

Sum function not showing correct value

I want to see Sum of Rating_Calc

Under sum of actual score , it should be sum(Rating_Calc) means 30 but its coming 20 and 2560.photophoto

Table:


Load
Year,
Name,
QuestionGroup,
Rating_Calc,
Sum(Rating_Calc) as "Sum Of Actual Score"
Resident Calc
Group By Year,Name,QuestionGroup,Rating_Calc;

4 Replies
Kushal_Chawda

@mnvrma  try with distinct keyword

Sum(distinct Rating_Calc) as "Sum Of Actual Score"

mnvrma
Partner - Contributor III
Partner - Contributor III
Author

@Kushal_Chawda 

No it's not working , it brings same value as column Rating_Calc

Kushal_Chawda

@mnvrma  please share sample data with expected output

ramchalla
Creator
Creator

@mnvrma please try the below in the script

Calc:

LOAD
"Year",
Name,
QuestionGroup,
Ques_Calc,
Rating_Calc
FROM [lib://dvSourceDataPath/ICO_Recharges_MI/Test/Test2.xlsx]
(ooxml, embedded labels, table is Sheet1);

Left Join (Calc)

Load
Year,
Name,
QuestionGroup,
Ques_Calc,
Sum(Rating_Calc) as "Sum Of Actual Score"
Resident Calc
Group By Year,Name,QuestionGroup,Ques_Calc;

in UI, you can simply add the measure Sum(Sum of Actual Score) to the dimensions.