Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show negative interval numbers as positive numbers

Dear all,

It is possible to show negative values as positive in a (pivot) table while remaining the 'negative' value as negative (see http://community.qlik.com/thread/29241).

This uses number formatting.

However, this solutions gives an wronged value if tried on interval (it shows the numbers double).

Does someone now a solutions?

Regards,

8 Replies
Not applicable
Author

you can use the fabs() function, which returns the absolute value of a number

Not applicable
Author

I was a bit short in my explanation. The thing is, that the numbers actually should stay negative for calculations etc., but negative numbers need to be shown positive. Therefore using the FABS functions will return incorrect values for other calculations (for example, the TOTAL).

Not applicable
Author

OK I got it

but i'm not sure I understand what is wrong with the formatting solution ? WHat interval are you talking about ?

Not applicable
Author

If you go into the properties of a Pivot Table, and go to the number tab,

you can override default expression settings and give up a manual

formatting. The option I need to use is 'interval'. If I try to use the

method in the thread mentioned earlier, that is putting 'h:mm;h:mm' in the

format cell, all numbers are presented double (instead of the negative

numbers positive).

The same happens if you format in the expression itself with using

'Interval(expression,'h:mm;h:mm').

Not applicable
Author

Hi, I have same problem, did youi find any solution or workarround?

Not applicable
Author

Koen and Walter,

I have had some success displaying negative numbers as positive, without actually changing it to a positive, by adjusting the Format Pattern.

In my case the number format I was using was the Fixed which has a default pattern of #,##0.0%. By adding an identical pattern to handle the negatives it can be shown as a positive: #,##0.0%;#,##0.0%. It's kind of like the negative formatting used on the money format, except without using the parenthesis.

Not applicable
Author

Philip

Yes, for number or money, but no for time formats wich is what we need.

swuehl
MVP
MVP

It should be possible to use dual() function for the formatting instead the option on Number tab:

dual(interval(fabs(INTERVALEXP)), INTERVALEXP )

INTERVALEXP being your expression or field that returns the negative number to format as positive interval