WOW comp calculation not correct
Hello, I am looking at this Domo Card and the WOW Comp calculation looks incorrect.
Last Week Spend is $0 and Spend 2 weeks ago is also $0 but WOW is not 0%. Does anyone have any idea why this can be the case?
For reference:
LW Spend calculation:
sum((CASE WHEN ((FY Order
= 0) AND (Fiscal Week No
= (Current Week
- 1))) THEN Amount_Cost
END))
2 Weeks Ago Spend calculation:
sum((CASE WHEN ((FY Order
= 0) AND (Fiscal Week No
= (Current Week
- 2))) THEN Amount_Cost
END))
WOW Spend calculation:
((sum(case when Fiscal Week Index
=(Current Week Index
-1) then Amount_Cost
end))
(sum(case when Fiscal Week Index
=(Current Week Index
-2) then Amount_Cost
end)))
/
(sum(case when Fiscal Week Index
=(Current Week Index
-2) then Amount_Cost
end))
Best Answer
-
Hmm odd. 0/0 should return a null value not what you are seeing. Is there a reason you don't use the same logic from the WOW % as you do in the spend LW and spend 2LW columns? For example for Spend LW why don't you use:
SUM(CASE WHENFiscal Week Index
=Current Week Index
- 1 THENAmount_Cost
END)I'm thinking perhaps the issue is not with the WOW calc, but instead the other 2 calcs.
If I solved your problem, please select "yes" above
0
Answers
-
It looks like you are missing a minus sign in your beastmode. Additionally, change % calculation is: (New Value - Initial Value) / Initial Value. So I would write your WOW spend calculation as follows:
(SUM(CASE WHENFiscal Week Index
=Current Week Index
- 1 THENAmount_Cost
END)-
(SUM(CASE WHEN
Fiscal Week Index
=Current Week Index
- 2 THENAmount_Cost
END)))/
(SUM(CASE WHEN
Fiscal Week Index
=Current Week Index
- 2 THENAmount_Cost
END))If I solved your problem, please select "yes" above
0 -
Thanks @colemenwilson for your input!
Totally my bad, I forgot to put the minus sign in the above description!I have this as my calculation now and it's still not working.
((sum(case when
Fiscal Week Index
=(Current Week Index
-1) thenAmount_Cost
end))(sum(case when
Fiscal Week Index
=(Current Week Index
-2) thenAmount_Cost
end)))
/
(sum(case whenFiscal Week Index
=(Current Week Index
-2) thenAmount_Cost
end))0 -
Hi Anna,
It still looks like the minus sign is missing. Along with extra parentheses.
If I solved your problem, please select "yes" above
0 -
Can you try copying and pasting my beastmode into your card and seeing if that works?
If I solved your problem, please select "yes" above
0 -
@colemenwilson hmm weird! When I copy and paste it into this comment section, the minus sign goes away.
But this is what I have which is the same equation that you provided for me. I copy and pasted yours but nothing changed.0 -
Hmm odd. 0/0 should return a null value not what you are seeing. Is there a reason you don't use the same logic from the WOW % as you do in the spend LW and spend 2LW columns? For example for Spend LW why don't you use:
SUM(CASE WHENFiscal Week Index
=Current Week Index
- 1 THENAmount_Cost
END)I'm thinking perhaps the issue is not with the WOW calc, but instead the other 2 calcs.
If I solved your problem, please select "yes" above
0 -
Great observation @colemenwilson!
Thank you for pointing that out, that was the issue!
0 -
@Anna_Otake Awesome, glad I could help! I'd appreciate if you marked my solution as the answer :)
If I solved your problem, please select "yes" above
1
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive