Help Converting DAX Formula into Alteryx Friendly Version
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
I currently have the below DAX formula running in Power Pivot in Excel and I'm trying to move the calculation into an Alteryx workflow. I'm relatively new to Alteryx and I'm having a hard time converting the language.
=if(weekday(EOMONTH([SGR],-1)+2)=7,EOMONTH([SGR],-1)+4,if(weekday(EOMONTH([SGR],-1)+2)=1,EOMONTH([SGR],-1)+4,EOMONTH([SGR],-1)+2))
For context, I'm trying to identify the 2nd Business Day of a given month using an existing date field (SGR in the above formula). For example, if the SGR date is equal to 2019-06-25, I would like to return the the date 2019-06-04 since that was the second business day of June.
There's probably a better way of doing this than what I'm trying so any help would be great!
Thanks,
Ryan
Solved! Go to Solution.
- Labels:
- Best Practices
- Date Time
- Help
- Tips and Tricks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @rfullm
Thank you for providing your context because I have 0 familiarity with DAX formulas.
I have created a workflow which should find the 2nd working day of each month and works with the example you provided. It should take in to account public holidays too. The only public holiday I have on the 1st of any month is New Years Day and it correctly returns the 2nd working day as the 3rd of January.
Please find the workflow attached below. You can of course update the list of public holidays to match your own.
Hope this helps 😊
- Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @AndrewBanh this is exactly what I'm looking for! Made a couple tweaks to the Holiday Calendar list but other than that every works exactly as I need it.
