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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 295 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 97 SQL DataFlows
- 608 Datasets
- 2.1K Magic ETL
- 3.8K Visualize
- 2.4K Charting
- 710 Beast Mode
- 49 App Studio
- 39 Variables
- 667 Automate
- 170 Apps
- 446 APIs & Domo Developer
- 44 Workflows
- 7 DomoAI
- 33 Predict
- 13 Jupyter Workspaces
- 20 R & Python Tiles
- 391 Distribute
- 111 Domo Everywhere
- 274 Scheduled Reports
- 6 Software Integrations
- 115 Manage
- 112 Governance & Security
- Domo Community Gallery
- 31 Product Releases
- 9 Domo University
- 5.3K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 103 Community Announcements
- 4.8K Archive