0

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?

you can see the string with so many decimals

1 Answer 1

2
CASE [Métrica]
WHEN 'Conteo' THEN  str(COUNTD( [paracontar] ))
ELSE str(ROUND((sum([Amount])/ 1000000)),1) + 'M'
END
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.