Alteryx Designer

Find answers, ask questions, and share expertise about Alteryx Designer.
Register for the upcoming Live Community Q&A Session - and don't forget to submit your questions for @DeanS regarding the future role of analytics here.
SOLVED

Help Converting DAX Formula into Alteryx Friendly Version

Highlighted
5 - Atom

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

Highlighted
Alteryx Partner

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

Highlighted
5 - Atom

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.

Labels