Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

positive and negative values in pi chart.

Hi All,

I designed PI chart but I want to positive values as positive and negative values as negative.

BUt any single row having negative value is shows error Positive and negative values in a chart.

But i want to display both values as it is in chart.Administrator

9 Replies
MVP
MVP

Re: positive and negative values in pi chart.

Considering that your have below expression

SUM(Sales)

Instead of above expression, change as below

FABS(SUM(Sales))

Untick values on datapoint

Now Create 2nd Expression

SUM(Sales)

Tick Values on datapoint...

Not applicable

Re: positive and negative values in pi chart.

Hi Manish,

I tried your solution but still it gives message positive and negative values in a chart.

MVP
MVP

Re: positive and negative values in pi chart.

Please check enclosed file..

Re: positive and negative values in pi chart.

Hi,

Change expression as

If(Sum(Sales)<0, Num(Fabs(Sum(Sales)), '-#,###'), Num(Sum(Sales), '#,###')

It will show you both positive and negative values in pie chart

Not applicable

Re: positive and negative values in pi chart.

I tried that solution but it will show negative valu as a postive value I want negative value as negative and postive as postive

Not applicable

Re: positive and negative values in pi chart.

Hi Celambarasan Adhimulam,

I tried that solution but it will show negative value as a postive

Re: positive and negative values in pi chart.

Think of the problem visually, If your data has values 3,4,5, then you can see how the pie chart will show the three different segments with sizes proportional to the value.

If the data has values 3, -4, 5, how would you display a segment that is -4 in relation to the other two positive values? Hence the error.  You cannot mix positive and negative values in a pie chart.

If all values in the pie chart are negative then QlikView will display the chart. So values of -3, -4, -5 will work in a pie chart.

FABS() will convert the data to absolute values to 3, -4, 5 will be changed to 3, 4, 5 but this may not be correct.

If you want to see both positive and negative values, use a bar chart not a pie chart !

MVP & Luminary
MVP & Luminary

Re: positive and negative values in pi chart.

Hi,

It is impossible to show negative values in Pie chart, instead you can try Bar chart or line chart.

Regards,

Jagan.

MVP & Luminary
MVP & Luminary

Re: positive and negative values in pi chart.

Hi,

Check this link, hope it helps you.

How to create a pie chart with positive and negative values

Regards,

Jagan.