Value_format to remove trailing dot

  • 6 September 2021
  • 3 replies
  • 20 views

 

    dimension: value_num {
      type: number
      value_format: "0.##"
      sql:CAST (${value_string} AS FLOAT64) ;;
    }

The result looks like:

    25. ←  Why “.” ?
    3.19  
    8.3  

How can I remove a trailing dot after 25 ?


3 replies

Userlevel 6
Badge +1

Because the dot is not conditional and unfortunately you can’t remove it. Looker uses Excel formatting and even there it’s still not solved and you need to use conditional formatting there.

Can’t you show 25 → 25.00 ?

Because the dot is not conditional and unfortunately you can’t remove it. Looker uses Excel formatting and even there it’s still not solved and you need to use conditional formatting there.

Can’t you show 25 → 25.00 ?

I tried. But do not know how to check if number do not have fraction in conditional formatting
Conditional formatting is a very mysterious thing.

What functions and operations available in it? Where I can find a list?

Userlevel 6
Badge +1

Apologies. What I meant was that in Excel people still have to use conditional formatting to remove the dot, all because there’s no way to make dot conditional in the formatting formula. That part of the visualisation engine in Looker is not the same as Excel

Reply