So you only want to show the decimal digits if your number has a decimal part, otherwise you don't.
You can also try something like:
If(YourValue = Round(Yourvalue), FormatCurrency(YourValue, "$", 0, "", ""), FormatCurrency(YourValue, "$", 2, ".", ""))
With this expression, this will be the outcome:
- For value 500 -> $500
- For value 500.25 -> $500.25
Kind regards,
Rui Barradas