web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested Answer

Send Automation Email using Power Automate in Power BI (Accumulate achievement Data)

(4) ShareShare
ReportReport
Posted on by 8
Hey all, 
 
I want to create an automation email for may sales team dashboard (have thousands of rows with distinct name) and send it monthly after we got the number of the month achievement. I already have a basic flow using the template and it works (when I click the trigger, each salesman got their only achievement since the data is sensitive I have to ensure each salesman only got their numbers). 

However, now the head of sales team wanted me to create the email for the upcoming month to be accumulated,
for example, 

the current email is something like this, 
 

Dear Name,

Here are your Achievement in the Month of January,

Month GWP
1 7,500
I have the same question (0)
  • Suggested answer
    Inogic Profile Picture
    709 on at
    Hi,
     
    Steps to Update Your Flow
    1. Use "List rows present in a table" (Excel, or from SharePoint/Dataverse if used)
    2. Initialize a variable of type Array to store filtered GWP data for each salesperson.
    3. Apply to each: Group data by distinct salesperson (e.g., using Union() trick or by using Dataverse distinct).
    4. Inside each salesperson loop:
    • Use "Filter array" to get all rows where Name == current salesperson AND Month <= current month.
    • Initialize a string variable htmlTable and build the HTML table like this:
    <table border="1" style="border-collapse: collapse;">
    <tr><th>Month</th><th>GWP</th></tr>
    Then loop through filtered results and append rows:
    <tr><td>@{items('Apply_to_each_row')?['Month']}</td><td>@{items('Apply_to_each_row')?['GWP']}</td></tr>
    Close it with:</table>
    5. Send an email
    Use the "Send an email (V2)" action and insert:
    Dear @{currentSalesperson},

    Here are your Achievements Month-to-Date for @{utcNow('MMMM')}:

    @{variables('htmlTable')}
     
    Hope this helps.
     
    Thanks!
    Inogic

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 41 Most Valuable Professional

#2
iampranjal Profile Picture

iampranjal 39

#3
Satyam Prakash Profile Picture

Satyam Prakash 35

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans