<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" /> This example database records the results of several Rock, Paper, Scissors matches. The Winner formula declares the winner of each match.

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

</aside>

Rock, Paper, Scissors Matches

Winner

ifs(
	prop("P1 Throw") == prop("P2 Throw"),
	"Tie", 
	prop("P1 Throw") == "Rock"
		and prop("P2 Throw") == "Scissors"
		or prop("P1 Throw") == "Paper"
		and prop("P2 Throw") == "Rock" 
		or prop("P1 Throw") == "Scissors" 
		and prop("P2 Throw") == "Paper",
	prop("Player 1"),
	prop("Player 2")
)

© Thomas Frank