Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Danqlik
Contributor II
Contributor II

Summing Multiple fields

Hi Everyone,

I am very new to Qliksense and so i still know very little about how to format Qliksense language, script, expressions etc. So if you could also explain what i have done wrong that would be very helpful!

I am trying to sum the fields shown in the data file to create a master measure or variable e.g 'Total Collections'. The formula i tried was:

Rangesum([On Time Collection],[Accelerated Collection],[Delinquent Collection],[Rejected Payment],-[NPL Buy Back]).

This gave me 0 as a value. Note* the reason the NPL buy back field has a '-' is because in my data its positive but i wish for it to be negative when calculated.

I also want the data to be able to be split by data, hence the month year field at the beginning. 

If anyone could offer a solution to this it would be greatly appreciated

Labels (3)
1 Solution

Accepted Solutions
Almen
Creator II
Creator II

Hello,

try  this:

Sum([On Time Collection]
+
Sum([Accelerated Collection])
+
Sum([Delinquent Collection])
+
Sum([Rejected Payment])
-
Sum([NPL Buy Back])

View solution in original post

3 Replies
Almen
Creator II
Creator II

Hello,

try  this:

Sum([On Time Collection]
+
Sum([Accelerated Collection])
+
Sum([Delinquent Collection])
+
Sum([Rejected Payment])
-
Sum([NPL Buy Back])
Danqlik
Contributor II
Contributor II
Author

Thanks alot, that worked. Additional question: 

If i wanted to turn that into a variable that could ignore the date value e.g so i can have some visualisations that ignore date filter and others that don't. Would i need to create two separate variables for this expression? or could the original variable be used along side {<Date>}?

Almen
Creator II
Creator II

If you copy the above into a variable and use that variable in an object, it will respect any other dimension you have in that object. If no Date is present it will simply sum all the values. 

If you have a filter object on your dashboard, you can dynamically change the values aswell.