Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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
Highlighted
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...

Highlighted
Not applicable

Hi Manish,

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

Highlighted
MVP
MVP

Please check enclosed file..

Highlighted

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

Highlighted
Not applicable

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

Highlighted
Not applicable

Hi Celambarasan Adhimulam,

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

Highlighted

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 !

Highlighted
MVP & Luminary
MVP & Luminary

Hi,

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

Regards,

Jagan.

Highlighted
MVP & Luminary
MVP & Luminary

Hi,

Check this link, hope it helps you.

How to create a pie chart with positive and negative values

Regards,

Jagan.