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.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