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
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.8K Visualize
- 2.5K Charting
- 731 Beast Mode
- 55 App Studio
- 40 Variables
- 682 Automate
- 175 Apps
- 451 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 122 Manage
- 119 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 107 Community Announcements
- 4.8K Archive