Calculating YTD for each week in table

Hi, I want to replicate a table that looks like this:
My dataset currently has date, impressions, and goal, and in ETL I've mapped the dates to a week by joining with another table. How would I use beast mode to find the impressions to date for each week, as well as the delivery percentage of goal?
Best Answers
-
You can use a window function to create a running total column:
sum(Sum(
Impressions
)) over(order byWeek
)And then you can create another one that divides that by your goal. (Not sure if that goal is in another column or what, so just using roughly what it seems to be based on your data):
sum(Sum(
Impressions
)) over(order byWeek
) / 915820I used a week number to be safe. I think your week format should work, since it should sort correctly.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
Hi @jrtomici,
Check this video from Jae Wilson. I think it answers your question:
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
0
Answers
-
You can use a window function to create a running total column:
sum(Sum(
Impressions
)) over(order byWeek
)And then you can create another one that divides that by your goal. (Not sure if that goal is in another column or what, so just using roughly what it seems to be based on your data):
sum(Sum(
Impressions
)) over(order byWeek
) / 915820I used a week number to be safe. I think your week format should work, since it should sort correctly.
Please 💡/💖/👍/😊 this post if you read it and found it helpful.
Please accept the answer if it solved your problem.
0 -
@DavidChurchman perfect, thank you!
0 -
Hi @DavidChurchman - bumping this to ask a similar question. Now I have this table I'd like to replicate:
Notice how the impressions to date are unique for the segment names and weeks.
Here is what my table in Domo looks like:
(Ignore the extra rows of data.) See how the impressions to date don't "reset" for the second segment name. Here is the beast mode I'm using for that column:
SUM(SUM(`Impression_Count`)) OVER(ORDER BY `Segment_Name`, `Week Number`)
And here is how I've sorted the card in Analyzer:
Is this possible?
0 -
Hi @jrtomici,
Check this video from Jae Wilson. I think it answers your question:
If you found this post helpful, please use 💡/💖/👍/😊 below! If it solved your problem, don't forget to accept the answer.
0 -
@Manasi_Panov exactly what I was looking for, thank you!
0
Categories
- All Categories
- 2K Product Ideas
- 2K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 310 Workbench
- 7 Cloud Amplifier
- 9 Federated
- 3K Transform
- 113 SQL DataFlows
- 653 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 796 Beast Mode
- 78 App Studio
- 44 Variables
- 757 Automate
- 188 Apps
- 480 APIs & Domo Developer
- 72 Workflows
- 17 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 408 Distribute
- 119 Domo Everywhere
- 279 Scheduled Reports
- 10 Software Integrations
- 141 Manage
- 137 Governance & Security
- 8 Domo Community Gallery
- 47 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 114 Community Announcements
- 4.8K Archive