Skip to content

Divide Function not producing number output #540

@malevans

Description

@malevans

I've written a function to take 2 values and calculate the percentage however the output that is produced is just a string showing the values, rather than a calculate number.

This is my code block:

searchType: frontmatter
searchTarget: Sleep, DeepSleep
datasetName: Sleep, DeepSleep
startDate: -7D
endDate: +0D
summary:
    template: "% Deep Sleep: {{average(dataset(1))}}/{{average(dataset(0))}}"

and this is the output

% Deep Sleep: 1.0/6.4 %

I was expecting a calculated output of 0.15625.

Am I missing something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions