Calculate Variance of a variable from two date ranges
Hello I am fairly new to domo, and I am wondering how to calculate the variance of a variable in my data set from a specific time frame (Quarter 1 2019) and divide that by then variance from another time frame (Quarter 3 2018)?
So far I have tried this, but this did not match with the values from a calculation in Excel:
VAR_POP(CASE WHEN `deploy_date` >= '1/1/2019' and `deploy_date` <= '3/31/2019' THEN `delivered` ELSE 0 end) /
VAR_POP(CASE WHEN `deploy_date` >= '7/1/2018' and `deploy_date` <= '9/30/2018' THEN `delivered` ELSE 0 end)
and
VAR_POP((CASE
WHEN `deploy_date` >= '1/1/2019' and `deploy_date` <= '3/31/2019' THEN VAR_POP(`delivered`)
Else 0 end)) /
VAR_POP((CASE
WHEN `deploy_date` >= '7/1/2018' and `deploy_date` <= '9/30/2018' THEN VAR_POP(`delivered`)
Else 0 end))
Best Answer

Are you sure that you're looking for the population variance?
I also don't think that you would want to use the else 0 in your case statement because that will increase the N value.
You should try:
VAR_POP(CASE WHEN `deploy_date` >= '1/1/2019' and `deploy_date` <= '3/31/2019' THEN `delivered` end)
/
VAR_POP(CASE WHEN `deploy_date` >= '7/1/2018' and `deploy_date` <= '9/30/2018' THEN `delivered` end)
______________________________________________________________________________________________
“There is a superhero in all of us, we just need the courage to put on the cape.” Superman
______________________________________________________________________________________________1
Answers

Thank you, I will try this now
0
Categories
 10.7K All Categories
 13 Getting Started in the Community
 39 Beastmode & Analytics
 2.1K Data Platform & Data Science
 59 Domo Everywhere
 2.7K Charting
 2.5K Ideas Exchange
 1.3K Connectors
 362 Workbench
 303 Use Cases & Best Practices
 503 APIs
 120 Apps
 48 News
 753 Onboarding
 1.2K 日本支部
 Private Company Board