Calculate the number of days that an event take place
I have a giant data set with Order number, profit, coupons, campaigns etc.
I have categorized each order's promotion campaign.
Now I want to calculate the profit per day for each campaign so I can make effective comparisons, but I don't really know how to use beast mode for this. I have a column of order data as well. I have a rough idea of either count(distinct(order date)) for every specific campaign category or use datediff?
Could anyonle help me out please?
Sample short verson of my data:
Order Number Order Date Promotion Campaign Profit
123456 05/10/2018 Summer Cool $123
14567 05/12/2018 Summer Cool $258
I'm not sure you'd even need Beast Mode. If you say start with a Table card. Your columns would be Order Date, Promotion Campaign, and Sum(Profit) and/or Avg(Profit). By just removing the details of Order Number you'd get the proper aggregations you'd be looking for. Then if those numbers match to what you were looking for I'd probably change it up to a more visually pleasing card like a Grouped Bar chart or something (depending on how many campaigns you run).
Hope that helps.0
Thanks for your quick response.
I tried your method to have a table of those three columns. The problem is that I have different number of days for each campaign plus on each day there are different number of orders placed.
The result table only shows the average profit per order each day (sum(profits)/# order).
I am looking for the average profit per day produced by the campaign overall (sum(profits)/# of days).0
I added subtotal rows and now it calculates what I wanted.
But do you know how I could extract this info out to build other cards?
I will also play around with it.
Then you could just leave out date and your fields be Promotion Campaign, and Sum(Profit) and/or Avg(Profit). You could put in a column for Max(date) and Min(date) so you know what range you're looking at.
You can't export subtotals out of the card. If you're left to only seeing what you want in the total or subtotals...you may want to think about a non-table card. Those may work out better for you.
I hope that helps.
Please like for thanks.0
- 10.6K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 477 Transform
- 1.8K Magic ETL
- 69 SQL DataFlows
- 478 Datasets
- 218 Visualize
- 260 Beast Mode
- 2.1K Charting
- 12 Variables
- 88 Cards, Dashboards, Stories
- 19 Automate
- 356 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 249 Distribute
- 65 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 191 Product Ideas
- 1.2K Ideas Exchange
- 11 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive