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.5K Product Ideas
 1.5K Ideas Exchange
 1.4K Connect
 1.1K Connectors
 285 Workbench
 4 Cloud Amplifier
 5 Federated
 2.7K Transform
 91 SQL DataFlows
 576 Datasets
 2.1K Magic ETL
 3.5K Visualize
 2.4K Charting
 619 Beast Mode
 25 App Studio
 33 Variables
 609 Automate
 155 Apps
 421 APIs & Domo Developer
 31 Workflows
 2 DomoAI
 29 Predict
 12 Jupyter Workspaces
 17 R & Python Tiles
 372 Distribute
 103 Domo Everywhere
 266 Scheduled Reports
 3 Software Integrations
 100 Manage
 97 Governance & Security
 4 Domo University
 15 Product Releases
 Community Forums
 37 Getting Started
 28 Community Member Introductions
 91 Community Announcements
 4.8K Archive