<aside> <img src="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" alt="https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a5a1e3ce-00fa-46e4-9a75-58c2aed9e8ce/Notion_Fundamentals_with_Thomas_Frank_-_Avatar_2021.png" width="40px" /> The example database below contains quarterly sales data for a fictional company. The Max property displays the dollar amount from the best quarter, while the Best Quarter property displays which quarter had the best performance.

Created by Thomas Frank | Learn Notion Formulas | Notion Basics | Templates | Twitter

</aside>

Product Sales

“Max” Property

max(prop("Q1"), prop("Q2"), prop("Q3"), prop("Q4"))

“Best Quarter” Property

// Compressed
if(prop("Q1") == prop("Max"),"Q1",if(prop("Q2") == prop("Max"),"Q2",if(prop("Q3") == prop("Max"),"Q3","Q4")))

// Expanded
if(
    prop("Q1") == prop("Max"),
    "Q1",
    if(
        prop("Q2") == prop("Max"),
        "Q2",
        if(
            prop("Q3") == prop("Max"),
            "Q3",
            "Q4"
        )
    )
)

© Thomas Frank