March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Solved! Go to Solution.
@POSPOS Hello,
here's my proposal.
Recurence every day, then initialize variable as string with this inside of it:
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 14)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 14)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 14), 'yyyy-MM-dd'),
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 15)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 15)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 15), 'yyyy-MM-dd'),
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 16)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 16)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 16), 'yyyy-MM-dd'),
null
)
)
)
(code basically checks whether 15th, 16th or 17th is weekend and find the earliest non weekend day to run it).
This gonna check what's the valid day for the run in the current month.
Then you have a condition that checks if today is that day and you then put the rest of your actions to the "TRUE" branch.
@POSPOS Hello,
here's my proposal.
Recurence every day, then initialize variable as string with this inside of it:
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 14)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 14)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 14), 'yyyy-MM-dd'),
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 15)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 15)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 15), 'yyyy-MM-dd'),
if(
and(
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 16)), 6)),
not(equals(dayOfWeek(addDays(startOfMonth(utcNow()), 16)), 0))
),
formatDateTime(addDays(startOfMonth(utcNow()), 16), 'yyyy-MM-dd'),
null
)
)
)
(code basically checks whether 15th, 16th or 17th is weekend and find the earliest non weekend day to run it).
This gonna check what's the valid day for the run in the current month.
Then you have a condition that checks if today is that day and you then put the rest of your actions to the "TRUE" branch.
Hi @POSPOS
1. Recurrence Trigger: Set the recurrence trigger to run on the 15th of every month.
2. Condition to Check Day of the Week:
• After the “Recurrence” step, add a condition to check the day of the week.
• Use the dayOfWeek function to get the day. dayOfWeek(utcNow()) returns an integer (0 for Sunday, 1 for Monday, …, 6 for Saturday).
3. Branch Conditions:
• If dayOfWeek(utcNow()) == 6 (Saturday), add a delay or calculate the next weekday (17th).
• If dayOfWeek(utcNow()) == 0 (Sunday), schedule it to run the next day (16th).
4. Run Export and Email Steps:
• For each condition, add the “Export to File for Power BI Reports” and “Send an email” actions in the correct branch.
5. Fallback (Optional):
• In case the 15th is a weekday, directly proceed with the “Export to File” and “Send an email” actions without any delay.
This will ensure that your flow sends the report on the 15th or the next weekday if the 15th falls on a weekend.
Hi @POSPOS, I believe your question is more for Power Automate community rather than Power BI experts 🙂
You can post your question here - Microsoft Power Platform Community Forum Thread
However, what you want to do is:
Good luck with your flow 🙂
@Sergii24 - Can you please provide detailed steps on how to achieve this as I am quite new to Power Automate.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |