Nested fixed functions

Hi All -
We are using fixed functions to calculate the average LTV per year for certain audiences. In the end, we want to be able to sum up the averages into a total 4-year LTV for the audience, which requires another fixed function. However, we're hitting errors when we wrap our calc in the new fixed function to sum up each of the averaged values. We've rewritten the calc so as not to reference any other beast modes, in case that was the issue, but still getting an error. Has anyone done anything similar successfully in a beast mode? Is there an issue with nesting fixed functions this way? Thanks!
Best Answer
-
Or…avoiding nesting fixed functions:
sum(
sum(Total LTV) fixed (by Year, Dimension 2, Dimension 3)
) /
sum(
sum(Total Orders) fixed (by Year, Dimension 2, Dimension 3)
)** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0
Answers
-
@Sean_Tully Could you please share the current fixed function you're using?
0 -
It's something like this:
sum(SUM(
Total LTV
) fixed (byYear
,Dimension 2
,Dimension 3
))
/
sum(SUM(Total Orders
) fixed (byYear
,Dimension 2
,Dimension 3
))0 -
What is the error you are receiving? Without the error message it's a bit hard to pinpoint the issue.
** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Yeah, sorry, it was just the generic 'This calculation contained a syntax error' message in the beast mode, but we've had a few eyes on it and rewrote it piece by piece and we don't see any problems with the syntax, other than maybe nesting the fixed functions within each other throws the error. In the end it looks like this:
sum(sum(
sum(SUM(
Total LTV
) fixed (byYear
,Dimension 2
,Dimension 3
))
/
sum(SUM(Total Orders
) fixed (byYear
,Dimension 2
,Dimension 3
))) fixed (by
Dimension 2
,Dimension 3
))0 -
Perhaps you could try something like this, wrapping the entire calculation in another fixed function:
sum(
sum(
sum(Total LTV) fixed (by Year, Dimension 2, Dimension 3)
) /
sum(
sum(Total Orders) fixed (by Year, Dimension 2, Dimension 3)
)
) fixed (by Dimension 2, Dimension 3)** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
Or…avoiding nesting fixed functions:
sum(
sum(Total LTV) fixed (by Year, Dimension 2, Dimension 3)
) /
sum(
sum(Total Orders) fixed (by Year, Dimension 2, Dimension 3)
)** Was this post helpful? Click Agree or Like below. **
** Did this solve your problem? Accept it as a solution! **0 -
I accepted @ArborRose's answer. We found a way to what we needed without using the fixed function, though not in the same way - we used case statements for each year and added those up rather than the nested fixed function.
1
Categories
- All Categories
- Product Ideas
- 2.1K Ideas Exchange
- Data Connections
- 1.3K Connectors
- 309 Workbench
- 17 Cloud Integrations
- Data & ETL
- 2.3K Magic ETL
- 120 SQL DataFlows
- 667 Datasets
- Visualize & Apps
- 90 App Studio
- 198 Pro-code Components
- 2.6K Charting & Analyzer
- 873 Calculations & Variables (Beast Mode)
- AI & Data science
- 23 Domo AI & AI Chat
- 4 Managing AI
- 18 Jupyter Workspaces
- Automate
- 122 Workflows
- Alerts
- Distribute
- 118 Domo Everywhere
- 284 Reporting
- Manage
- 146 Governance & Security
- 489 APIs
- 11 Add-ins & Plugins
- 13 Domo Community Gallery
- 49 Product Releases
- 13 Domo University
- Community Forums
- 41 Getting Started
- 31 Community Member Introductions
- 118 Community Announcements
- 5K Archive