The calculation is perfect and works great for the Value but not for the custom symbol in a simple KPI chart or Bar chart.
I get the correct value eg if the answer is 535 000 000, with the calculation I get 535Mn in the flat table otherwise in the KPI chart I get 535 (Without the symbol).
The loss of the symbol in the chart is my issue.
Does that make sense?
Maybe cus the expression was wrong?
=if(Sum(Sales) > 1000000, num(Sum(Sales)/1000000 , '$#,##0.00 M'),
if(Sum(Sales) > 1000, num(Sum(Sales)/1000, '$#,##0.00 K'), num(Sum(Sales), '$#,##0.00')))
and it gives me K or M.
However you need to adjust number of 0 when you dividing the sum(Sale) to make sense of those symbols.