format decimal based on dimension name in table

I have a table visualization with a Product on the ROWS, an Amt measure, and a SalesDate on COLUMNS. I would like some Products to display with decimals and some with no decimals. Is there a way to achieve this with a calculated measure, something like:

if ($Product$) == “Chairs”
{ return $Amt$, formatted with 2 decimals;}
else
{ return $Amt$;}

or any other way to get the desired end result?

Product January 2019 February 2019 March 2019
Bikes $200 $250 $300
Campers $1000 $2000 $1500
Chairs $10.50 $20.80 $9.99

Two things come to mind for me. First we do have text formats which can have range overrides in the metric set’s measure itself. You can read more about this here:

https://www.dundas.com/support/learning/documentation/analyze-data/formatting-text#h2-3-formatting-ranges

Assuming your ‘Chairs’ category falls within a specific measure range, that might solve it for you.

The other thing I can think of is to create a state that targets the member ‘Chairs’:

https://www.dundas.com/support/learning/documentation/analyze-data/set-up-states-on-a-metric-set#h4-2-comparing-against-a-hierarchy

Once you have a state setup perhaps you could use the visualization’s state formatting properties to target it to get it to display how you want.

That first suggestion worked perfectly for my situation. Thank you!

No problem, glad it’s working.