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.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