Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
BARC’s The BI Survey 19 makes it official. BI users love Qlik. GET REPORT
gauthamchilled
Contributor

Unable to sum up negative values

Hi,

I have a bar chart where i am unable to sum up negative values.

it sum up only positive values but not the negative values. can any one help?

Regards,

Gautham

Tags (1)
9 Replies

Re: Unable to sum up negative values

Would you be able to share a sample?

Best,

Sunny

gauthamchilled
Contributor

Re: Unable to sum up negative values

find the attachment, in straight table it is showing the correct sum but not in the bar chart.

gauthamchilled
Contributor

Re: Unable to sum up negative values


is it a bug or i have to change the expression?  any one help

MVP
MVP

Re: Unable to sum up negative values

Alternate way to show sum is

expression

SUM(balance)

Remove Value on Data point from Expression Tab

Add one more expression, untick Bar and tick values on data point

SUM(Total <car> balance)

maleksafa
Valued Contributor

Re: Unable to sum up negative values

in your example you are saying that car c is showing 2000, it is correct. what are your expected values? for car c you have only one value which is 2000 so the sum will be 2000.

if you mean that for car b it is showing 2000 and -1000 and you want the sum to be 1000, then you need to remove the year dimension from the chart.

MVP
MVP

Re: Unable to sum up negative values

Add a second expression:  if(Column(1) > 0, sum(total <car> balance), '')

Then turn off "Values on Data Points" for the first expression

Turn on "Values on Data Points" and turn off "Bar" for the second expression

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
gauthamchilled
Contributor

Re: Unable to sum up negative values

Hi Jonathan,

thanks for the help, but in case of multiple expressions how to arrive the same. for example see the attached in this

gauthamchilled
Contributor

Re: Unable to sum up negative values

for example in the attachment for car a it is showing 3000 instead of 1000

gauthamchilled
Contributor

Re: Unable to sum up negative values

can any one help?