Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for
Search instead for
Did you mean:
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).

1 Solution

Accepted Solutions
MVP
16 Replies
MVP

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

Master II
Author

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

MVP

use  FABS(expression)

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

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

MVP

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.
Partner - Specialist II

Please find attached

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
MVP

FABS(Sum(Value))

Community Browser