Hi everyone!
I am creating a Power Automate flow that sends out an email every Wednesday. I’ve connected Power Automate to Power BI, so I can retrieve data from my report, such as values, dates, and revenues, and then use these values in the email body.
Right now, the flow is triggered once a week on Wednesday, and the email is sent with the updated data.
This way, I am able to have the correct data 99% of the time.
However, in the first week of the month, I need to skip sending the email if the value of a date in my query falls on a certain day of the week, such as Sunday.
Do you guys know the best way to do this?
I tried to create a variable to use in a compose action and then use the DayOfWeek function, but it’s not working.
Basically, I have two separate flows: one for weekly data and the other for end-of-month data.
The data I have comes from both my DWH and other Excel files that I usually receive on Tuesday.
I take a snapshot of my data on Sunday and then integrate the data from the files I receive on Tuesday (which contains data from Monday to Sunday of the previous week). This way, I have updated data by Wednesday, and I send out the email to my users.
In August, the end of the month was on a Saturday, and the weekly snapshot was on Sunday. This meant that my end-of-month snapshot was fine, but my weekly snapshot only had data for Sunday. When this happens, I prefer not to send the weekly email and skip it to the next Wednesday.
This is my flow without the condition that I need, right now is set to a weekly recurrence on Wednesday.
I have the maximum date of my context period. I’m trying to select that date and use it in a compose action with the DayOfWeek function to determine what day of the week it was. If there are fewer than 3 working days within that snapshot, I don’t want to send the email.
I’m thinking that calculating the number of working days between two snapshots and setting the condition that there must be at least 3 working days for the flow to start might be an option but I don't know how to do it.
Thank you so much for the help!