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 4year 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
 1.7K Product Ideas
 1.7K Ideas Exchange
 1.5K Connect
 1.2K Connectors
 292 Workbench
 4 Cloud Amplifier
 8 Federated
 2.8K Transform
 95 SQL DataFlows
 603 Datasets
 2.1K Magic ETL
 3.7K Visualize
 2.4K Charting
 697 Beast Mode
 43 App Studio
 39 Variables
 658 Automate
 170 Apps
 441 APIs & Domo Developer
 42 Workflows
 5 DomoAI
 32 Predict
 12 Jupyter Workspaces
 20 R & Python Tiles
 386 Distribute
 111 Domo Everywhere
 269 Scheduled Reports
 6 Software Integrations
 113 Manage
 110 Governance & Security
 8 Domo University
 30 Product Releases
 Community Forums
 40 Getting Started
 30 Community Member Introductions
 98 Community Announcements
 Domo Community Gallery
 4.8K Archive