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 to any 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 to any 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 to any 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.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 753 Beast Mode
- 61 App Studio
- 41 Variables
- 692 Automate
- 177 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive