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

  • Starlord
    Starlord Domo Employee
    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"

Answers

  • Starlord
    Starlord Domo Employee
    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"