Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Negative values in chart

Hi All,

How to show negative values in brackets () in pie chart?

For ex: -53 as (53) and -111 as (111).

Capture.PNG

1 Solution
16 Replies
avinashelite

try with DUAL function , if part the expression would contain the - values and right part with positive values

qlikviewwizard
Master II
Master II
Author

Hi Avinash, I tried but unable to achieve. Could you please tell me how?

Chanty4u
MVP
MVP

use  FABS(expression)

jonathandienst
Partner - Champion III
Partner - Champion III

A pie chart cannot display a mix of positive and negative numbers in any meaningful way. At best you will confuse your users, at worst, the results would be just plain wrong (such as using Fabs()).

Select an alternative visualisation such as a bar chart.

In general, to display -ve numbers in brackets, on the numbers tab, select Fixed (0 decimals) and enter the format pattern 0;(0)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
qlikviewwizard
Master II
Master II
Author

Hi Jonathan, 0;(0)  is not working. I am using dual(fabs(sum(sales)),fabs(sales))

vikasmahajan

you can use FABS function for the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
manojkulkarni
Partner - Specialist II
Partner - Specialist II

Please find attached

jonathandienst
Partner - Champion III
Partner - Champion III

I don't know what you are trying to do with the dual, but the dual function will ignore the format setting. If you format the plain expression sum(sales) using the format string I specified, you will get "20" for +20 and "(20)" for -20.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Chanty4u
MVP
MVP

FABS(Sum(Value))