So I think this is just because Tableau can't fit them in the space, and the 2 values are one under another and there is only space for one row (this is the default way Tableau creates the label, when we add 2 fields). If you go into the label, and put the 2 values in the same row they should appear
So you can do this via the custom formatting option
This takes the form
Format for Positives; Format for Negatives; Format for Zero
so for example
Would show positive numbers with a "+" infront, negative with a "- "in front, and zero with nothing in front (all to 1 DP and Thousand Separated)
You can play with these to get it to display how you need.
I need to the same total length for the value with one digit after the decimal.
Exemple : 100.0% is the maximum length (the max is : 3digits,1digit%) and for 9,2% I need to display : space space9,2%
How can I format this in order to get :
100,0% and space space9.2% (_ _ means 2 space)
for 82.9% I need to display : space82.9% (space char is the empty char or a space in the keyboard) Any help on that.
Thanks in advance
So this one is a bit tricky! and will only work with uniform width fonts (such as Courier New, as I've used here)
First I need to compute my calculation....I've gone with Share of Sales
Next I need to ensure it only returns 1 DP (once I've also de-percentaged it by multiplying by 100)
[Sales Share (Rounded)]
(SUM([Sales]) / TOTAL(SUM([Sales])))*100,1)
Next I can count the characters
[Sales Share % (Rounded) Char Len]
LEN(STR([Sales Share (Rounded)]))
Then I can asses how many leading zeros I need
[Sales Share % Leading Spaces]
IF 4-[Sales Share % (Rounded) Char Len] = 1 THEN SPACE(1)
ELSEIF 4-[Sales Share % (Rounded) Char Len] = 2 THEN SPACE(2)
I can then put these all on the text tile
And then my pipe separators all line up. Most fonts aren't uniform width...so a '0' isn't the same width as a space, say...which is where this breaks down.
Hope that helps and makes a bit of sense.
Controlling Leading Spaces.twbx 590.8 KB