Currency Formatting for Charts

I am looking for a way to format the currency in a chart. When I use the format “0.000,” K"", or “0.000,” K", I get the following message:

Invalid Format String || Format Strings using ECMA376 Format Codes

I want to show $1K instead of $1000 in the X-axis (or any axis for that matter in the future).

I cannot find any other option so far

Thanks!

0 7 3,996
7 REPLIES 7

Hey there! $#,“K” should take care of it. There’s more details here as well.

That’s great! Thanks!

I have this piece of code that you can use in either lookML or in viz:

named_value_format: billion_million_thousand {
  value_format: "0.000,,,\" B\"[>999999999];0.000, \" K\"[<1000000];0.000,,\" M\"[<999999999]"
  ## IMPORTANT: to use in a viz, copy this string: 0.000,," B"[>999999999];0.000, " K"[<1000000];0.000,," M"[<999999999]
}

@Cyril_MTL_Analy
But this works only for positive values, or?

In this state it’s indeed only for positive value.

THanks @Cyril_MTL_Analy
Do you mean the current state of Looker, or the state of the line of code?
Do you have a solution for negative values?
Liquid works, but has the big disadvantage that it cannot be overridden in a visualization.

The lookML I provided

I don’t have a solution for negative value as we’re limited to 3 “conditions” with the excel style formating.

Top Labels in this Space