Number Format

Hi All,

How can I format negative number as the below in a VIEW table:

image

I read around and have vague idea that I need to use “handsontable” but not sure how I should change in the code.

Thank you very much

The number format itself you can easily handle just by setting the Format attribute on the measure dimension to the following.
#,##0_);(#,##0);“-”_)

If you then want to format negative numbers red then this can be done via applying a class with conditional formats. (Not sure why you would want to do this though unless there is a specific requirement to make negative numbers pop out, as this would make grids quite busy.)

1 Like

@cw-ch-scott I would like to have red colour on the font only, not on the cell. Is this possible? I have tried conditional formatting and it fills whole cells and yes it looks busy!

Thanks!

I don’t think that we provide pre-defined custom styles which are for the font (foreground) color only. This can be done, but you would need to define a new class in the scss and run gulp to publish the change. If you have no idea what I am talking about then talk to someone on your team with web development experience. If you don’t have such a person then I suggest forget about this requirement.

1 Like

Yep, it works with custom-style css :slight_smile: