I want to create a column that contains the total sum of another column.
Hi everyone, looking to create a column that contains total revenue in order to find individual contributions. I have tried to do this using rank/window function within the magic ETL however all I get is a running total.
Any help appreciated :) Thanks!
Best Answers
-
The Group by tile will work if you want to perform this calculation in ETL. However, the downside there is that the total will be calculated based on the logic that you build into the ETL. For example, if you partition your totals to give you the total monthly sales you would not be able to change the data in a visualization to show weekly sales. Also, if you wanted to exclude a particular product or region, you would need to determine that prior to the group by tile and would not be able to change that decision at the card level.
I would suggest using a calculated field and a variable for this. Something like:
Variable 1:
Create a variable that would allow you to select the metric that you want to partition the data by. Either Month, Year, Region, Manager, etc.
Then create a beastmode to use that variable:
SUM(SUM(`Sales`)) FIXED (BY `Variable1`)
This would allow more flexibility in terms of how you are totaling the sales. Also, by using a calculated field, if you decide to filter out a product or region, The calculation will respond to those filters and update the value in your card.
2
Answers
-
The Group by tile will work if you want to perform this calculation in ETL. However, the downside there is that the total will be calculated based on the logic that you build into the ETL. For example, if you partition your totals to give you the total monthly sales you would not be able to change the data in a visualization to show weekly sales. Also, if you wanted to exclude a particular product or region, you would need to determine that prior to the group by tile and would not be able to change that decision at the card level.
I would suggest using a calculated field and a variable for this. Something like:
Variable 1:
Create a variable that would allow you to select the metric that you want to partition the data by. Either Month, Year, Region, Manager, etc.
Then create a beastmode to use that variable:
SUM(SUM(`Sales`)) FIXED (BY `Variable1`)
This would allow more flexibility in terms of how you are totaling the sales. Also, by using a calculated field, if you decide to filter out a product or region, The calculation will respond to those filters and update the value in your card.
2
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 637 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 761 Beast Mode
- 65 App Studio
- 42 Variables
- 702 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 52 Workflows
- 10 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 132 Manage
- 129 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive