Market Share (% of Total) and % Change/Trend Calculations
Is there a way using beast mode, or some other functionality, to create the following two equations in a DOMO card — to display on graphs as well as in a table/pivot table.
1) Market Share as a percent of total. In other platforms like PowerBI with DAX this would be achieved with something like the following random example: Sum(Sales)/Calculate(Sum(Sales),All(Colors). The idea being on a row where the color is red, it would divide the sales figures for red by the total sales for all colors. Numerator = red sales, denominator = total sales.
If that cannot be done in a beast mode, is there a way through other functionality to represent the % of total for a given column within a pivot table card? As in the value in a row divided by the sum of that column?
2) Is there a way with beast modes to calculate period over period trend? E.g. using a pivot table card If I had Color (Red) in the rows, and Months (Jan, Feb, March...Dec.) in the columns I would want to be able to calculate the % change month over month, in an excel formula it would be: (Red February Sales / Red January Sales) -1 copy that formula across to get MoM trend %, how do you do this in DOMO? I would imagine people report on these types of metrics with domo. I have quite a bit of experience with Power BI and Tableau, but still learning DOMO.
Any Help would be wonderful! Thank you in advance!
Comments
-
Hi @Bwaalsh
1) It sounds like you're wanting to do a windowing function. This is possible within Domo as a beast mode however you need to have the feature switched on in your instance. If you don't have it you'll need to talk to your CSM.
Something like:
SUM(`Sales`) / SUM(SUM(`Sales`)) OVER (PARTITION BY `Color`)
2) Domo can do this internally within Analyzer / Card Editor using a Period over Period type graph and editing the values in the Date Selector (upper right of your canvas). You can defined which period type you're wanting and it will calculate it for you. If you're wanting more flexibility surrounding there is a more complex method of structuring your data in a different way so that you join to a date dimension table calculating the period types manually. I've written about this previously here: https://dojo.domo.com/discussion/comment/50540#Comment_50540
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**3 -
+1 @GrantSmith except it sounds like you need to add a partition. @Bwaalsh,
sum(Sales) / sum(sum(sales)) over (partition by colors)
I actually just posted a video involving window functions (https://www.youtube.com/watch?v=Esnu1PSxRjM&t=35s)
Jae Wilson
Check out my 🎥 Domo Training YouTube Channel 👨💻
**Say "Thanks" by clicking the ❤️ in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"3
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