How to Capture Previous Month Data After on the 1st of Following Month

I am looking for assistance to create the correct beast mode calculation based on the following:
Your assistance is greatly appreciated!
Best Answer
-
@elvira_bannon slight correction to my initial beast mode. The first line needs to change so that we are just looking to see if the current date is the first day of the month.
CASE when DAY(CURRENT_DATE()) = 1 THEN
CASE when MONTH(startdate
) = MONTH(CURRENT_DATE()) then 'Exclude'
ELSE 'Include'
END
when MONTH(startdate
) = MONTH(CURRENT_DATE()) then 'Include'
ELSE 'Exclude'
END**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
-
Here is what I suggest you do.
Change your date range from Month to Date to Last 2 Months. This will bring in the current month and the previous month data.
Next, create a beast mode that looks like this:
CASE when DAY(
gldate
) = DAY(CURRENT_DATE()) and MONTH(gldate
) = MONTH(CURRENT_DATE()) THEN
CASE when MONTH(gldate
) = MONTH(CURRENT_DATE()) then 'Exclude'
ELSE 'Include'
END
when MONTH(gldate
) = MONTH(CURRENT_DATE()) then 'Include'
ELSE 'Exclude'
ENDDrag this beast mode into your filters and filter to Include.
This will will check when it is the 1st of the current month and exclude any data in the current month and include the previous month. If it isn't the 1st of the current month it will include the data from the current month and exclude the everything else.
**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 -
@elvira_bannon slight correction to my initial beast mode. The first line needs to change so that we are just looking to see if the current date is the first day of the month.
CASE when DAY(CURRENT_DATE()) = 1 THEN
CASE when MONTH(startdate
) = MONTH(CURRENT_DATE()) then 'Exclude'
ELSE 'Include'
END
when MONTH(startdate
) = MONTH(CURRENT_DATE()) then 'Include'
ELSE 'Exclude'
END**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 -
@elvira_bannon Would changing filter view to 'previous month' suffice?
IF I SOLVED YOUR PROBLEM, PLEASE "ACCEPT" MY ANSWER AS A SOLUTION. THANK YOU! 😎😎😎
1 -
Thank you very much Mark Snodgrass.
The second formula you provided works as needed.
You are awesome!
0 -
I would like additional assistance regarding the beast mode provided by Mark. It worked for the first day of the month. However, it does not capture data on the second day of the month, which is current month. Do you have additional recommendations for the formula to work past the first of the month? Thank you!
0 -
Please disregard my previous message. It appears that the problem has to do with the DataSets not updating.
0
Categories
- All Categories
- 1.2K Product Ideas
- 1.2K Ideas Exchange
- 1.4K Connect
- 1.1K Connectors
- 273 Workbench
- 2 Cloud Amplifier
- 3 Federated
- 2.7K Transform
- 78 SQL DataFlows
- 525 Datasets
- 2.1K Magic ETL
- 2.9K Visualize
- 2.2K Charting
- 437 Beast Mode
- 23 Variables
- 513 Automate
- 115 Apps
- 390 APIs & Domo Developer
- 8 Workflows
- 26 Predict
- 10 Jupyter Workspaces
- 16 R & Python Tiles
- 332 Distribute
- 77 Domo Everywhere
- 255 Scheduled Reports
- 66 Manage
- 66 Governance & Security
- 1 Product Release Questions
- Community Forums
- 40 Getting Started
- 26 Community Member Introductions
- 68 Community Announcements
- 4.8K Archive