Beast Mode vs Formula Tile on Magic ETL 2
Best Answers
-
Hi @Fadem
What's your beast mode? Is it using the same column(s)? Are you getting any sort of error message?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
I actually have another Beast Mode that is validated in the Cards but not the ETL:
My error message says function sum requires an aggregation context. Use group by action.
Beast Mode:
(Sum(`Amount` + `Employer_Taxes` + `Fringes`) - Sum(Case when Case when SUBSTRING(`Expense_Account`,4,2)>=75
then 'Indirect'
else 'Direct'
end = 'Direct' then 0 else `Amount` + `Employer_Taxes` + `Fringes`
end)) / (Sum(`Amount` + `Employer_Taxes` + `Fringes`))
0 -
You can't use aggregates in the formula tile. It's processing data on a record by record basis. You'd need to break out your different component's you're aggregating into separate columns then feed that into a group by to do the aggregation (sum) and then do your final subtraction and divisions.
Total
- `Amount` + `Employer_Taxes` + `Fringes`
Would be one column and your case statement would be a separate
You can also simplify your case statement:
Conditional Total
- Case when SUBSTRING(`Expense_Account`,4,2)>=75
- then `Amount` + `Employer_Taxes` + `Fringes`
- else 0
- end)
Group by whatever your key fields are and tell it to SUM your Total (new column: Grand Total) and Conditional Total (new column: Grand Conditional Total) fields
Then feed the group by into another formula tile and do:
- (`Grand Total` - `Grand Conditional Total`) / `Grand Total`
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0
Answers
-
Hi @Fadem
What's your beast mode? Is it using the same column(s)? Are you getting any sort of error message?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
@GrantSmith I was not getting an error message however, it worked after I expanded the formula editor! Thank you!
0 -
I actually have another Beast Mode that is validated in the Cards but not the ETL:
My error message says function sum requires an aggregation context. Use group by action.
Beast Mode:
(Sum(`Amount` + `Employer_Taxes` + `Fringes`) - Sum(Case when Case when SUBSTRING(`Expense_Account`,4,2)>=75
then 'Indirect'
else 'Direct'
end = 'Direct' then 0 else `Amount` + `Employer_Taxes` + `Fringes`
end)) / (Sum(`Amount` + `Employer_Taxes` + `Fringes`))
0 -
You can't use aggregates in the formula tile. It's processing data on a record by record basis. You'd need to break out your different component's you're aggregating into separate columns then feed that into a group by to do the aggregation (sum) and then do your final subtraction and divisions.
Total
- `Amount` + `Employer_Taxes` + `Fringes`
Would be one column and your case statement would be a separate
You can also simplify your case statement:
Conditional Total
- Case when SUBSTRING(`Expense_Account`,4,2)>=75
- then `Amount` + `Employer_Taxes` + `Fringes`
- else 0
- end)
Group by whatever your key fields are and tell it to SUM your Total (new column: Grand Total) and Conditional Total (new column: Grand Conditional Total) fields
Then feed the group by into another formula tile and do:
- (`Grand Total` - `Grand Conditional Total`) / `Grand Total`
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
You're awesome! Thank you!
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 305 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 3K Transform
- 108 SQL DataFlows
- 648 Datasets
- 2.2K Magic ETL
- 4K Visualize
- 2.5K Charting
- 777 Beast Mode
- 75 App Studio
- 43 Variables
- 735 Automate
- 186 Apps
- 471 APIs & Domo Developer
- 64 Workflows
- 14 DomoAI
- 40 Predict
- 17 Jupyter Workspaces
- 23 R & Python Tiles
- 405 Distribute
- 117 Domo Everywhere
- 278 Scheduled Reports
- 10 Software Integrations
- 138 Manage
- 135 Governance & Security
- 8 Domo Community Gallery
- 44 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 113 Community Announcements
- 4.8K Archive