Skip to content

Instantly share code, notes, and snippets.

@andenacitelli
Last active February 23, 2023 23:13
Show Gist options
  • Save andenacitelli/79f649fd29efd119a50c8f2ba0303f18 to your computer and use it in GitHub Desktop.
Save andenacitelli/79f649fd29efd119a50c8f2ba0303f18 to your computer and use it in GitHub Desktop.
A Notion formula that outputs a priority number based on a due date and priority. Lower means do it sooner.

Must run these through a tool that removes newlines like https://www.textfixer.com/tools/remove-line-breaks.php before you plug into Notion.

(
    (
        not(
            empty(
                prop("Start Date")
            )
        ) 
    )
    and
    (
        now() > prop("Start Date")
    )
) 
    ? 100
    : 
    (
        dateBetween(
            dateAdd(
                empty(prop("Due Date")) ? 
                    dateAdd(now(), 4, "weeks") : 
                    prop("Due Date"),
                1, 
                "days"
            ), 
            now(), 
            "days"
        )
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment