Beastmode subtotal not calculating correctly


Hello,
I am trying to figure out what is wrong with my 3 beastmodes. One for this year's email sends, one for last year's email sends, and one for this year vs last year's difference.
Currently, the chart looks like this and the beast mode doesn't seem to be calculating correctly in each row plus the subtotal.
This Year Email Sends beast mode is:
CASE WHEN FY Order
= 0 THEN COUNT(cm_pla
) ELSE 0 END
LastYear Email Sends beast mode is:
CASE WHEN FY Order
= 1 THEN COUNT(cm_pla
) ELSE 0 END
This Year vs Last Year difference beast mode is:
((CASE WHEN FY Order
= 0 THEN COUNT(cm_pla
) ELSE 0 END)- (CASE WHEN FY Order
= 1 THEN COUNT(cm_pla
) ELSE 0 END))
If someone can help me look into this, I would appreciate it.
Thank you in advance!
Best Answers
-
@Anna_Otake You're definitely on the right track. The only changes I recommend are moving the COUNT outside the case statement and removing the ELSE 0 clause. Your formulas should all be formatted like this:
count(case when `FY Order` = 0 then `cm_pla` end)
1 -
Hi @Anna_Otake I'm glad that worked! If you want to count unique email types, just use COUNT(DISTINCT) instead of COUNT()
1 -
@Anna_Otake could you do a COUNT(DISTINCT LY Email Sends) to ensure your getting unique email sends and not total sends per day?
Edit: @MichelleH beat me to it :)
1
Answers
-
@Anna_Otake You're definitely on the right track. The only changes I recommend are moving the COUNT outside the case statement and removing the ELSE 0 clause. Your formulas should all be formatted like this:
count(case when `FY Order` = 0 then `cm_pla` end)
1 -
Hi @MichelleH, that worked perfectly! Thank you so much for your help!
Another thing I want to tweak is that I'm trying to count the number of email types and not the number of emails sent per week. For example, this one campaign has 11 emails sent to this campaign but all other days except 5/29 have been sent twice in one day. Is there a beast mode to consolidate and count this as one send? Essentially, all I want to achieve in this beast mode is to create a summary number of how many unique types of emails were sent every week.0 -
Hi @Anna_Otake I'm glad that worked! If you want to count unique email types, just use COUNT(DISTINCT) instead of COUNT()
1 -
@Anna_Otake could you do a COUNT(DISTINCT LY Email Sends) to ensure your getting unique email sends and not total sends per day?
Edit: @MichelleH beat me to it :)
1 -
@MichelleH @DomoDork You two are awesome! That fixed it, thank you so much!
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 311 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3.8K Transform
- 656 Datasets
- 115 SQL DataFlows
- 2.2K Magic ETL
- 811 Beast Mode
- 3.3K Visualize
- 2.5K Charting
- 80 App Studio
- 45 Variables
- 771 Automate
- 190 Apps
- 481 APIs & Domo Developer
- 77 Workflows
- 23 Code Engine
- 36 AI and Machine Learning
- 19 AI Chat
- AI Playground
- AI Projects and Models
- 17 Jupyter Workspaces
- 410 Distribute
- 120 Domo Everywhere
- 280 Scheduled Reports
- 10 Software Integrations
- 142 Manage
- 138 Governance & Security
- 8 Domo Community Gallery
- 48 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive