Reputation: 1506
I have the parameter "Metrica", to see 1) headcount or 2) amount
I am using this formula to convert metrics to a string to show:
CASE [Métrica]
WHEN 'Conteo' THEN str(COUNTD( [paracontar] ))
ELSE left(str( int( sum([Amount])/ 100000) / 10 ),6) + 'M'
END
When the parameter "Metrica" is on 'Conteo' the string is OK, But when is not on 'Conteo' then string appears with so many decimals like '2.399999M'
How to do this conditional formating taking out many decimals into the string?
Upvotes: 0
Views: 81
Reputation: 7757
CASE [Métrica]
WHEN 'Conteo' THEN str(COUNTD( [paracontar] ))
ELSE str(ROUND((sum([Amount])/ 1000000)),1) + 'M'
END
Upvotes: 2