Skip to content

Rounding sometimes ignored when the value is close to a whole number #2637

@oldsagemonkey

Description

@oldsagemonkey

What happened?

I'm currently using rounding to gather percentages on specific goals. Every once in a while, when the value is very close to a whole number, I get the entire value displayed with the additional digits. Here's a visual example:

Image

DQL

table without ID round(length(filter(rows.file.frontmatter.exersize_goal, (t) => t = true))/length(rows.file.day), 2)*100  + "%" as ""
from "Daily Notes"
where note_date >= date(today) - dur(30 days)
   and note_date <= date(today)
group by rows.file.day

JS

Dataview Version

1.9.14

Obsidian Version

0.5.68

OS

MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions