Replicate Excel Formula by using Domo to Calculate 80/20
Hey there! I'm trying to apply the Pareto Principle to the following dataset I've attached using either Beast Mode, Magic ETL, or MySQL.
I want to replicate what is done in column "Bottom 25" in Domo but I'm at a loss.
I've used the following query, but it gives me whole numbers instead of what's displayed in the "Bottom 25" Column.
In the second image is a screenshot of what the following query provides me.
Using the Magic ETL, I have already created a new column called "users total" that is a constant sum of the "Users" column.
SELECT a.*, round(100*(SELECT COUNT(*) FROM `copy_of_test_xlsx` AS b WHERE b.`Users` <= a.`Users` ) / total.cnt,1 ) AS percentile FROM `copy_of_test_xlsx` AS a CROSS JOIN ( SELECT COUNT(*) AS cnt FROM `copy_of_test_xlsx`) AS total ORDER BY percentile DESC
The Bottom 25 columns was found by using the following:
"Audience Interest Score" =C2/(SUM(C:C))
"Bottom 25" =SUM(D$2:D2)
Is there any way to replicate this? Please and thank youuu
Best Answer
-
Hi @user052846
I understand now. You're simply doing a running total of the `Audience Interest Score` column. You can do this with a window function within a beast mode however you'd need to make sure you have windowing functions enabled in your instance. You can talk with your CSM to get them turned on. It's a simple feature switch.
SUM(SUM(`Audience Interest Score`)) OVER (ORDER BY `Audience Interest Score` DESC)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2
Answers
-
Hi @user052846
I'm a little confused by your request as the only whole number you have is the number of users. Looking at your two examples you have a decimal representation of a percentage (Domo) compared to your excel document (whole # representation). In cards you can tell Domo to display as a percentage (and tell it to multiply by 100) by clicking on the column name on your table card (assuming you're using a table card to replicate the excel document) selecting Format > Display As > Percentage and check the box that says multiple by 100. This way you don't need to calculate the percentage yourself.
Alternatively you could format your Bottom 25 column as a percentage in your SQL [ ROUND(Bottom25 * 100, 2) ] however I'd recommend against this option as it will remove data precision and doesn't allow you to change how many decimal places are utilized)
If you're wanting to do the conditional text formatting to highlight rows with values over 75% like your excel document you'll want to make sure you use the decimal representation (0.75 instead of 75) since that is how the data is actually represented in your dataset.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Oh sorry I didn't clarify.
From the SQL query I added, I was wondering if there's another way to run the query so that the percentile column I created in DOMO shares the same numbers as displayed in the Bottom 25 column in excel.0 -
Hi @user052846
I understand now. You're simply doing a running total of the `Audience Interest Score` column. You can do this with a window function within a beast mode however you'd need to make sure you have windowing functions enabled in your instance. You can talk with your CSM to get them turned on. It's a simple feature switch.
SUM(SUM(`Audience Interest Score`)) OVER (ORDER BY `Audience Interest Score` DESC)
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**2 -
Wow, it's so simple ?
Thanks so much! I really appreciate your help!
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.8K Visualize
- 2.5K Charting
- 738 Beast Mode
- 56 App Studio
- 40 Variables
- 684 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 46 Workflows
- 10 DomoAI
- 35 Predict
- 14 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