Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Totals function (sum) for bar chart?

Hi Qlik's communites,

I'm trying to get bar chart to show Total Sum like on the right value 143,382.54 (yellow highlighted). Of course this is on a table which can be change with the totals functions so it will not reflect sum of GRA 195,374.61 (yellow highlighted).

But in bar chart we're not given Totals function and the sum is 195,374.61. So how can I done this in bar chart or modification to my expression?

Labels (2)
1 Solution

Accepted Solutions
sunny_talwar

Try this

Sum(Aggr(

If(Currency = 'THB', Sum(Goods_Receipt_Amount)*vThaiRate, Sum(Goods_Receipt_Amount))

, Sub_Category, Currency))

Also, look here

http://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/ChartFunctions/NestedAggr...

This link is for pivot table, but is applicable for other charts also

View solution in original post

3 Replies
sunny_talwar

Try this

Sum(Aggr(

If(Currency = 'THB', Sum(Goods_Receipt_Amount)*vThaiRate, Sum(Goods_Receipt_Amount))

, Sub_Category, Currency))

Also, look here

http://help.qlik.com/en-US/qlikview/November2017/Subsystems/Client/Content/ChartFunctions/NestedAggr...

This link is for pivot table, but is applicable for other charts also

Anonymous
Not applicable
Author

Yeap, like the other question, same formula

Fiorrie
Creator
Creator

Hi Sunny

I am facing the same issue, somehow it is not working despite using Sum(Aggr), can you please advise?

When I change to Sum in Total Function in the table is correct number but in the chart it is not excluding as it should.

Many thanks

IF(SUM(AGGR($(vPrice),[pn])) > SUM(AGGR($(vContrPrice),[pn]))
or SUM(AGGR($(vPrice),[pn])) = SUM(AGGR($(vContrPrice),[pn])),

FABS(SUM(AGGR($(vP_Lost_Test),[pn]))))