I have a Measure in Tableau which has to be display dynamically in Kilos, Millions , Billions and also formatted as 200k, 2726M.
Asked
Active
Viewed 72 times
1 Answers
0
You can try with this formula which you can expand on your needs:
str(
if SUM([Sales]) > 1000000000 THEN ROUND(SUM([Sales])/1000000000,1)
elseif SUM([Sales]) > 1000000 THEN ROUND(SUM([Sales])/1000000,1)
elseif SUM([Sales]) > 1000 THEN ROUND(SUM([Sales])/1000,1)
else SUM([Sales])
end )
+
if SUM([Sales]) > 1000000000 THEN 'B'
elseif SUM([Sales]) > 1000000 THEN 'M'
elseif SUM([Sales]) > 1000 THEN 'K'
else ''
end

Fabio Fantoni
- 3,077
- 3
- 22
- 32
-
What's your result like? please take a look at the screenshot in the answer – Fabio Fantoni Aug 02 '21 at 09:55