Can I use a Beast Mode for Null/Blank Values?
I have two issues I am trying to solve. Company123 has a budget of 706.34, but there was no $ for this week. The cell is blank, so my formula is not calculating. The Budget GP-GP should equal -706.34, but it is blank. Can I do a Beast Mode, or even something in the ETL would be okay?
Second issue is the 27,504.75 minus -77,584.85 should equal -50,080.10, but it is showing 105,089.60. Is there a better Beast Mode Formula I can use?
Best Answers
-
You can coalesce the values to default to 0 if they're null:
SUM(COALESCE(`Budget GP`, 0)) - SUM(COALESCE(`Gross Profit`, 0))
Edit: updating the formula.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
You're subtracting a negative number so it ends up adding them together which is why you're getting 105 which is the span between your two numbers.
It sounds like you want to take the difference of the budget and the absolute value of gross profit:
SUM(COALESCE(`Budget GP`, 0)) - ABS(SUM(COALESCE(`Gross Profit`, 0))
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
I figured it out - thanks!
0
Answers
-
You can coalesce the values to default to 0 if they're null:
SUM(COALESCE(`Budget GP`, 0)) - SUM(COALESCE(`Gross Profit`, 0))
Edit: updating the formula.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Is this in ETL or Beast Mode?
Thank you!
0 -
COALESCE will work in either a Beast Mode or a formula tile or custom group by aggregation logic in Magic ETL.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
Thanks! Do you how I can fix the below. Appreciate the quick replies!
Second issue is the 27,504.75 minus -77,584.85 should equal -50,080.10, but it is showing 105,089.60. Is there a better Beast Mode Formula I can use?
0 -
I am getting a Syntax Error when I use in Beast Mode.
0 -
You're subtracting a negative number so it ends up adding them together which is why you're getting 105 which is the span between your two numbers.
It sounds like you want to take the difference of the budget and the absolute value of gross profit:
SUM(COALESCE(`Budget GP`, 0)) - ABS(SUM(COALESCE(`Gross Profit`, 0))
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
You've got a COALESCE inside your COALESCE and you don't have your parenthesis properly terminated / closed. Try copying the forumla I posted directly above.
My original formula had an issue. I've updated it.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
I figured it out - thanks!
0
Categories
- All Categories
- 1.9K Product Ideas
- 1.9K Ideas Exchange
- 1.6K Connect
- 1.3K Connectors
- 302 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 104 SQL DataFlows
- 636 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 761 Beast Mode
- 65 App Studio
- 42 Variables
- 702 Automate
- 182 Apps
- 458 APIs & Domo Developer
- 52 Workflows
- 10 DomoAI
- 39 Predict
- 16 Jupyter Workspaces
- 23 R & Python Tiles
- 401 Distribute
- 116 Domo Everywhere
- 277 Scheduled Reports
- 8 Software Integrations
- 132 Manage
- 129 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 12 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 111 Community Announcements
- 4.8K Archive