So, I have two different views, that both have measures “count user ids”, but based on different events: i.e. sent emails and bounced emails. These two views are joined by user ids. I want to create a calculated field inside my model, “Bounced / Sent”, which requires me to divide total bounced users to total sent users.
Code below is not working (I put it in the base sent emails view, to which I join bounces view).
measure: bounced_share {
type: number
value_format: "0.00"
sql: ${bounced_emails.total_bounces}/${sent_emails.total_sent};;
}
What is the best way to do this, except for creating this table calculations inside the dashboard?
Thank you!