Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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
MK_QSL
MVP
MVP

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
Author

Hi Manish,

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

MK_QSL
MVP
MVP

Please check enclosed file..

CELAMBARASAN
Partner - Champion
Partner - Champion

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
Author

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
Author

Hi Celambarasan Adhimulam,

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

Colin-Albert

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 !

jagan
Luminary Alumni
Luminary Alumni

Hi,

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

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Check this link, hope it helps you.

How to create a pie chart with positive and negative values

Regards,

Jagan.