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.5K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 8 Federated
- 2.9K Transform
- 100 SQL DataFlows
- 616 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 738 Beast Mode
- 57 App Studio
- 40 Variables
- 685 Automate
- 176 Apps
- 452 APIs & Domo Developer
- 47 Workflows
- 10 DomoAI
- 36 Predict
- 15 Jupyter Workspaces
- 21 R & Python Tiles
- 394 Distribute
- 113 Domo Everywhere
- 275 Scheduled Reports
- 6 Software Integrations
- 124 Manage
- 121 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 10 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 108 Community Announcements
- 4.8K Archive