Creating custom columns for use in tables
End Goal: Our goal is to create a table that can successfully group elements by row (such as state) and implement column values that are based on custom formulas. The input data for this table consists of our company's sales data.
What I am attempting to do currently is create a pivot table that groups our monthly sales by Sales Region (rows), and then the various columns are various units of measure (MTD cost, prior year MTD cost, etc.)
Challenge: It has been fairly easy for me to create a column for MTD cost, as that is simply "sum of revenue" with a date filter for the current month. However, we want to begin to implement more complex logic into columns. One example of such logic is a column called "MTD trending."
Requirements: The data MUST be groupable by rows. We MUST be able to create custom measures and add them as volumn values within the table.
MTD Trending = ((MTD Revenue / number of business days elapsed in current month) * number of total business days in current month) / MTD Quota)
The end result is a % value of the MTD quota that we are expected to finish near. How might I accomplish the creation of this column (and other columsn with complex formulas) within a sumo table?
Best Answer
-
You should be able to accomplish all of this using Beast Mode formulas. You can put the formula you provided above into a beast mode, replacing the appropriate logic and dataset columns as appropriate. You'll probably need to use a few of the available datetime functions to calculate the number of days passed, and total days in the current month.
The trick, however, is that you'll need to create them in a different card using the same dataset as the Sumo card. While creating the beast mode, remember to check the box near the bottom that enables sharing across the dataset.
Once you've made your beast mode and saved it and the card, you can access it as new column on your sumo card.
Let me know if you need further help on anything I've put forth.
0
Answers
-
You should be able to accomplish all of this using Beast Mode formulas. You can put the formula you provided above into a beast mode, replacing the appropriate logic and dataset columns as appropriate. You'll probably need to use a few of the available datetime functions to calculate the number of days passed, and total days in the current month.
The trick, however, is that you'll need to create them in a different card using the same dataset as the Sumo card. While creating the beast mode, remember to check the box near the bottom that enables sharing across the dataset.
Once you've made your beast mode and saved it and the card, you can access it as new column on your sumo card.
Let me know if you need further help on anything I've put forth.
0 -
Okay - so my follow up question is "what datetime function do I use?" but that is an entirely separate quesiton that I'll need to ask.
0 -
As for the time funtion
If your data set doesnt already have every bussiness day of the month (future ones included) on at least 1 row
I would add a column with total number of bussiness days for the month. This would need to be done by joining a to the data set I would join to the MTD Quota rows.
So, crudely expressed
SUM(Revenue) / Sum(Distinct( Bussiness Days*)) * AVG(Total Business Days) / SUM(MTD Quota)
Your Date Range should be "This Month)
* You will need a case statement to discount Sat/Sun
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.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 123 Manage
- 120 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive