Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Talk to Experts Tuesday, January 26th at 10AM EST: Qlik Sense. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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

Accepted Solutions
16 Replies

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

Master II
Master II

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

Champion III
Champion III

use  FABS(expression)

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
Master II
Master II

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

Champion
Champion

you can use FABS function for the same.

Vikas

Partner
Partner

Please find attached

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
Champion III
Champion III

FABS(Sum(Value))