Beast Mode: Calculations from multiple fields
Hello Dojo!
My question is whether we can create a beast mode calculation to index values from multiple audiences. For example, we want to create a beast mode that calculates the quotient of two dataset fields (ex. `Total Devices`/`Total Devices`).
To my understanding, the two dataset fields listed above always come from the same data row. Is there a way pull in a value from a specificied data row?
Ex. (`Total Devices` from ID=11111) / (`Total Devices` from ID=22222)
Lastly, is there a way to make a variable ID selection that allows a user to see calculations that reflect their filtered view?
Ex. If a user selects the filters ID=11111 & ID=xxxxx, the beast mode calculates (`Total Devices` from ID=11111) / (`Total Devices` from ID=xxxxx),
if a user selects the filters ID=11111 & ID=yyyyy, the beast mode calculates (`Total Devices` from ID=11111) / (`Total Devices` from ID=yyyyy.
Any help you can provide would be greatly appreciated.
Thank you,
Alex
4FRONT (team4front.domo.com)
Best Answer
-
Hello!
Thank you for your questions!
You are correct that calculations are typically row-by-row or aggregated rows, and don't allow explicit access to data from other specified rows. One exception is Window functions, which currently have very limited Support in the context of Beast Modes. You can learn more about those here: https://knowledge.domo.com?cid=windowingfunctions
Beyond that, you may consider using a Magic ETL dataflow for your calculations, because they also have an action called "Rank & Window" that offers more functionality than the Window functions available in Beast Mode: https://knowledge.domo.com?cid=etlactionsrankandwindow
For the secondary question, my process to do what you mention would be to use a dataflow to create a new column where every row contains the value of `Total Devices` from ID=11111, then on the card I would make a beast mode to divide that NEW column by `Total Devices`, and allow the card filtering to control which value goes into the denominator.
Starlord
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2
Answers
-
Hello!
Thank you for your questions!
You are correct that calculations are typically row-by-row or aggregated rows, and don't allow explicit access to data from other specified rows. One exception is Window functions, which currently have very limited Support in the context of Beast Modes. You can learn more about those here: https://knowledge.domo.com?cid=windowingfunctions
Beyond that, you may consider using a Magic ETL dataflow for your calculations, because they also have an action called "Rank & Window" that offers more functionality than the Window functions available in Beast Mode: https://knowledge.domo.com?cid=etlactionsrankandwindow
For the secondary question, my process to do what you mention would be to use a dataflow to create a new column where every row contains the value of `Total Devices` from ID=11111, then on the card I would make a beast mode to divide that NEW column by `Total Devices`, and allow the card filtering to control which value goes into the denominator.
Starlord
**Say “Thanks” by clicking the “heart” in the post that helped you.
**Please mark the post that solves your problem by clicking on "Accept as Solution"2
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
- 124 Manage
- 121 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