Minus sign placement in negative prices

Screenshot from 2022-03-17 10-11-04.png

Is there a way to move the ‘-’ symbol to the left of the dollar sign for ‘Price’ types?

1 Like

Unfortunately there is no easy way to format prices the way you would like. There is the option to using accounting format (it’s at the bottom of UX options) but I think that uses parenthesis rather than a minus sign.

2 Likes

Perhaps copying the absolute value in another column and using it for display.

3 Likes

Actually that’s not a bad idea, a VC with something like the following would work,

concatenate(
  if(
    [price_field] < 0, 
    "-$", 
    "$"
  ),
  text(
    abs([price_field])
  )
)
3 Likes

Yes, and to control the display of both columns through their Show fields:

  • For the original column: [_This] >= 0
  • For the new column: [price_field] < 0

__

Why the IF()? I think the goal is to remove the minus sign always.

1 Like

The goal was to have the minus sign to the left of the dollar sign for negative numbers.

3 Likes

Thanks for the responses! I was able to achieve it by using a strategy similar to what @graham_howe proposed, a virtual text column with the following formula:

CONCATENATE(
  IF(
    [price_field] < 0,
    '-',
    ''
  ),
  TEXT(
    ABS([price_field])
  )
)

The dollar signs still came through so I just needed the minus sign in the IF().

2 Likes

I need to sleep :sleeping_face: :slightly_smiling_face:

2 Likes