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

Announcements
Write Table now available in Qlik Cloud Analytics: Read Blog
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Sum from another chart

I haev two charts with each having a sum() of their table.

But i'd like to in the same table show totals on the last row as one table.sum + table2.sum and then a total of these 2

table1

Sum: 1234


table2:

sum 2345

Table 3:   

          1234

          2345

Total:  3579

6 Replies
sunny_talwar

May be use Dimensionality() function to get this done

If(Dimensionality() = 0, Sum(Table1.Sum) + Sum(Table2.Sum), YourExpression)

marcus_sommer

You couldn't access anything from another object - you will need to build everything within one object.

- Marcus

giakoum
Partner - Master II
Partner - Master II

And use variables to hold expressions so that you only correct them once if a change is needed

Not applicable
Author

Thanks making 2 variables worked. But what would be optimal and I want to achieve is not the sum per row for 10 rows I just want a new row below the totals I already have and there another row with the sum of these 2 fields. Is that possible?

Not applicable
Author

Captvzxxvure.PNG

If you look at this one; I have 2 tables. And then I did as you said 2 variables summed them. 1+2 = 3. Problem is as you see I get multiple rows of column 3. I don't want them there I just want the totals of 1+2 preferably on the last row or even mroe prefered 3 totals rows so to speak with those values.

Am I confusing?

marcus_sommer

Take a look on the suggestion from Sunny and add those totals to a certain (maybe additionally) dimensionality - whereby you might need some aggr, TOTAL or set analysis to calculate these totals independent from the dimensions from the current object. Further it could be helpful to transfer these calculations into a variable to minimize the complexity and to improve the performance.

- Marcus