Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Arithmetic of totals of two different Charts

Hi community,

Is there away to work with only the totals of charts?  I have two charts and I would like to make a thrid which subtracts one's totals from the other's totals for 3 expressions.  The Charts are straight tables with 3 expressions each and their dimensions are different.  Do I use dimensionality?

5 Replies
Not applicable

Arithmetic of totals of two different Charts

Brandon, you don't have refer to charts in order to manupulate totals. Try to use set analysis or aggr function based on chart dimensions. If you give me example, I'll try to help you.

Not applicable

Re: Arithmetic of totals of two different Charts

I would like the total of the top chart subtracted from the bottom.  Regards, and thanks!

Not applicable

Re: Arithmetic of totals of two different Charts

hmm..Try to add aggr function in expression based on dimension from each chart.

Not applicable

Re: Arithmetic of totals of two different Charts

See I tried that and it sort of worked but I had to suppress null selections before.  Is there a way to sill do that?  Otherwise my total is too high.

jason_michaelid
Honored Contributor II

Re: Arithmetic of totals of two different Charts

Generally, all you need to do is use the same expression in a text box that you use in your charts as this will give the same effect as disregarding the dimensions.  However, in your case you also need to adjust what you are summing slightly to exclude the NULLs.

Instead of

Sum({<Customer={SuperCustomer} Sales)

if that was the expression in your chart, you should use

Sum({<Region={North} IF(IsNull(Region)=0,Sales))

so you are only summing the sales values where the Region is not NULL.

See attached for your version.

(By the way, you should consider putting your expressions into variables for ease of maintenance. If you need to change them you only have to do it once!)

Hope this helps,

Jason

Community Browser