Count the number of working days consumed or remaining month to date
I am trying to work out a Beast Mode Calculation on a dataset that I have that will tell me how many working days have elapsed since the 1st of the current month, or how many are left.
I have a value in my dataset which tells me how many working days there are in the current month, I'm struggling with trying to figure out how many have been used up.
I looked at trying to join the DOMO Calendar to the dataset but I can't figure out how I could do that as my data set is produced daily and has a whole bunch of summary numbers and the only date is the last updated date so I'm stuggling with what to join on.
Any help will as allways be appreciated
By the way I"ll be in Salt Lake for Domopalooza tomorrow afternoon so if anyone can help and wants to meet up that would be great.
Drinks on Me !
Best Answer
-
It sounds like you're almost there. Here's what I did, maybe that will help bring your across the finish line.
I created a "Working Day" calendar that's just a list of dates (from like 2000-2200) and the "WorkingDayOfMonth" for each date.
I then take my dataset I'm working with and Left Join it to the Working Day calendar for any date field I'm wanting to use. The only thing you need from the Working Day Calendar is the "WorkingDayOfMonth" field, and just rename it based on your joining date. So if you're joining on "Execution Date" you would rename the WorkingDayOfMonth field to ExecutionWorkingDayOfMonth and then repeat if you have multiple dates.
You can also add some constants in your data flow, like Current Day or Last Day of Month, and then join on those dates to get the CurrentWorkingDay and LastWorkingDay to compare to.
Let me know if you have any questions.
Sincerely,ValiantSpur
0
Answers
-
It sounds like you're almost there. Here's what I did, maybe that will help bring your across the finish line.
I created a "Working Day" calendar that's just a list of dates (from like 2000-2200) and the "WorkingDayOfMonth" for each date.
I then take my dataset I'm working with and Left Join it to the Working Day calendar for any date field I'm wanting to use. The only thing you need from the Working Day Calendar is the "WorkingDayOfMonth" field, and just rename it based on your joining date. So if you're joining on "Execution Date" you would rename the WorkingDayOfMonth field to ExecutionWorkingDayOfMonth and then repeat if you have multiple dates.
You can also add some constants in your data flow, like Current Day or Last Day of Month, and then join on those dates to get the CurrentWorkingDay and LastWorkingDay to compare to.
Let me know if you have any questions.
Sincerely,ValiantSpur
0 -
That worked, I built out a calendar table that had the date, whether or not it was a working day (WHich allowed me to input the Holidays) and then an additional column for days remaining.
I then joined it to the main dataset using the last update date.
Now every day I have one date set and it tells me how many working days in the month are left.
Thanks for your help
Randy
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
- 56 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