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
 11.3K All Categories
 6 Private Company Board
 2 APAC User Group
 12 Welcome
 45 Domo News
 10.2K Using Domo
 2K Dataflows
 2.6K Card Building
 2.3K Ideas Exchange
 1.3K Connectors
 354 Workbench
 271 Domo Best Practices
 14 Domo Certification
 483 Domo Developer
 58 Domo Everywhere
 113 Apps
 734 New to Domo
 86 Dojo
 Domopalooza
 1.1K 日本支部
 4 道場日本支部へようこそ
 31 お知らせ
 65 Kowaza
 305 仲間に相談
 667 ひらめき共有