Disclaimer - although i am aware of the custom formats, i have to confess i have never understood how they work... i know there is some method but it escapes me!
this blog seems to indicate Excel formats should transfer to Tableau
this seemed a good guide >> Custom Excel number format
did you have an example of the actual figures, for testing?
thank you for your answer and the links. I already tried several different formulas without any success, but still will also check out the links you provided.
Please find attached an example:
AK_D is a small negative number which is only displayed in brackets by Tableau if I allow to display 6 decimal digits. However, I only want to show one but with the information that it is negative (the brackets).
Thank you very much again for your help!
number_format.twbx 12.2 KB
thanks again for your help, I really appreciate it. Unfortunately that is not what I want. -0.2 is fairly different from the real value of 0.000002 isn't it?
So my goal would be just to show the sign information, i.e. (0,0) in this case.
ah, apologies - misunderstood on that part...I'll keep trying but don't have a ready answer
i don't believe the Excel formats translate over (to tableau) as described - that format works in Excel vs Tableau
it seems tableau doesn't see the 'value' in the same way as Excel, without the decimal places, most strange
Tricky problem...so the formats (I've found anyway) do broadly transfer from Excel to Tableau, however it does appear Tableau assesses Positive or Negative at the display precision.
Depending on what your final usecase...I've got a pretty horrible and hacky solution! that might work
First I create
[Small Negative Flag]
SUM([Value])<0 AND SUM([Value])>-0.05
and then I create these 2 fields
[Negative Opening Bracket]
IIF([Small Negative Flag],'(',NULL)
[Negative Closing Bracket]
IIF([Small Negative Flag],')',NULL)
I then put them next to one another on the display
As we only get the brackets when we need them, we won't get double brackets for large negatives (as the ELSE terms evaluates to NULL, and NULLs aren't plotted)
Hope that helps...
number_format.twbx 15.9 KB
Just wondering if you got any solution to this problem ? i am facing similar issue where i need to show small negative number like -0.002 as (0.0) however tableau only show 0.0 after you format it to 1 decimal point. I want to show the negative indicator and retain its integer type.
I can do it using calculated fields however type of the field is string(with added brackets in original field).
This is a simple fix. OP, in the customized format do the following:
0.0; (0.0); (0.0)
Now you will get parenthesis for even small negative numbers.
Edit: I tested this and found that if you do this, if the number is 0.02 it will unfortunately show (0.0).
So the solution only works if you know all your 0.0 numbers will be negative.