Formula/Beast Mode Help
Hello,
I'm stuck with how to write a Beast Mode/Formula that looks at two different dates.
Here's the example:
Employee 1: First Date Field = 12/02/2020 And their Email Date Field = 12/06/2020
Employee 2: First Date Field = 12/02/2020 And their Email Date Field= 12/23/2020
I want the Beast Mode to return 'True' if the Email Date Field happens within 8 days from their First Date Field, else 'False'. I'm thinking that this should be a simple formula but yet, here I am.
Having said that, Employee 1 would be 'True' and Employee 2 is 'False'.
Thank you!
Best Answer
-
You will want to use a case statement and the datediff function. It would look like this:
CASE WHEN DATEDIFF(EmailDate,FirstDate) <= 8 THEN 'True' ELSE 'False' END
This should do it for you.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1
Answers
-
You will want to use a case statement and the datediff function. It would look like this:
CASE WHEN DATEDIFF(EmailDate,FirstDate) <= 8 THEN 'True' ELSE 'False' END
This should do it for you.
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.1 -
Great! Thank you, I don't know why I didn't think to look for a datediff formula.
1 -
@grandele glad it worked for you. If you can mark my answer as the accepted solution, it will help others in the community. Have a great day!
**Check out my Domo Tips & Tricks Videos
**Make sure toany users posts that helped you.
**Please mark as accepted the ones who solved your issue.0
Categories
- 10.5K All Categories
- 8 Connect
- 918 Connectors
- 250 Workbench
- 470 Transform
- 1.7K Magic ETL
- 69 SQL DataFlows
- 477 Datasets
- 193 Visualize
- 252 Beast Mode
- 2.1K Charting
- 11 Variables
- 17 Automate
- 354 APIs & Domo Developer
- 89 Apps
- 3 Workflows
- 20 Predict
- 5 Jupyter Workspaces
- 15 R & Python Tiles
- 247 Distribute
- 63 Domo Everywhere
- 243 Scheduled Reports
- 21 Manage
- 42 Governance & Security
- 174 Product Ideas
- 1.2K Ideas Exchange
- 12 Community Forums
- 27 Getting Started
- 14 Community Member Introductions
- 55 Community News
- 4.5K Archive