Custom format to show decimal place for number between 0 and 1

I’m following the documentation but I cannot get the result I want:

5.2 → 5
0.5 → 0.5
0 → “”

Here is my snippet I tried so far without success [=0]"";[>=1]0;[<1]0,#

Version: 24.2.3.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: de-DE (de_DE.UTF-8); UI: en-US
24.2.3-2
Calc: threaded
1 Like

If I am not mistaken, you can only set two conditions
[=0]#;[<1]0,0;0
the last option cannot have conditions, it is for when the first two are not met.

Very neat! Since I only handle positive values, this is sufficient.