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
Comments
-
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.
Thanks!
0 -
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.
Matt
Please like for thanks.
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