Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a table with the following structure (Screenshot 1):
([Factor1] + [Factor2] + ... + [Factor8])*Sum([Count])
What I want:
Sum(M2:M13)
Sum of each row of [Sum]
What I get:
(Sum([Factor1] + [Factor2] + ... + [Factor8]))*Sum([Count])
Screenshot 1 ('Excel Sum'):
Screenshot 2 ('Qlik Sum'):
Thanks in advance for every help.
By default Qlik calculates the total row by recalculating the expression over all the data. If you want the total to be a straight sum of rows you can change the chart Data Totals function dropdown from "Auto" to "Sum".
I believe your expression is written incorrectly for what Qlik expects. "Sum(a + b)" and "Sum(a) + Sum(b)" are the same if there is only one row. When you get to the total row, you have multiple rows.
I suggest you write the expression as:
Sum(RangeSum(Factor1, Factor2,...,Factor8) + Count)
That should work for both the rows and the Total. It will also work if ever rolled up to multiple rows using another dimension.
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
By default Qlik calculates the total row by recalculating the expression over all the data. If you want the total to be a straight sum of rows you can change the chart Data Totals function dropdown from "Auto" to "Sum".
I believe your expression is written incorrectly for what Qlik expects. "Sum(a + b)" and "Sum(a) + Sum(b)" are the same if there is only one row. When you get to the total row, you have multiple rows.
I suggest you write the expression as:
Sum(RangeSum(Factor1, Factor2,...,Factor8) + Count)
That should work for both the rows and the Total. It will also work if ever rolled up to multiple rows using another dimension.
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Changing the TOTAL chart data to Sum was the missing key I needed.
Now it sums up all the rows as I wanted.
Thanks for your help!