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.6K All Categories
 APAC User Group
 12 Welcome
 36 Domo News
 9.6K Using Domo
 1.9K Dataflows
 2.4K Card Building
 2.2K Ideas Exchange
 1.2K Connectors
 339 Workbench
 251 Domo Best Practices
 11 Domo Certification
 461 Domo Developer
 47 Domo Everywhere
 100 Apps
 703 New to Domo
 84 Dojo
 Domopalooza
 1.1K 日本支部
 4 道場日本支部へようこそ
 22 お知らせ
 62 Kowaza
 295 仲間に相談
 649 ひらめき共有