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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / I would like to sent a...
Power Automate
Unanswered

I would like to sent a email by create table header and sub table summary from an excel.

(0) ShareShare
ReportReport
Posted on by 16

Greeting, 

I have a table as shown below.

 

VendorCountryDate
HPTH8/23/2023
NebraskaTH8/23/2023
Employment SecurityVN8/23/2023
HPLA8/23/2023
HPTW8/23/2023
OklahomaSG8/23/2023
Employment SecurityTH8/24/2023
HPTH8/24/2023
MinnesotaSG8/24/2023
HPSG8/24/2023
IllinoisSA8/24/2023
WorkforceSA8/25/2023
HPSA8/25/2023
WorkforceSA8/25/2023
IllinoisKH8/25/2023

 

I would like to have an output like this, kindly please help:

Jagen007_0-1693322143334.png

 

Categories:
I have the same question (0)
  • Jagen007 Profile Picture
    16 on at

    @DamoBird365  kindly need your help on this sir

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Jagen007 

     

    Based on my video https://youtu.be/pwJ73jFEtDQ you would want to get the distinct dates using select and then union.  This will give you three dates.  Then in an apply to each, with the union as input, filter the original data based on the current item.  Then create the html table on the filtered data.  Finally add a compose inside the apply to each and add the current item (date), followed by a <br> and the output of the html table.  Outside of the apply to each, you can join the tables created by creating an array with outputs('nameofcompose') and joining with some more <br> tags.

     

    The flow would look like:

    DamoBird365_0-1693324275389.png

     

    I put your table into a json array, which is the same as get rows/items etc:

    [
    {
    "Vendor": "HP",
    "Country": "TH",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "Nebraska",
    "Country": "TH",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "Employment Security",
    "Country": "VN",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "HP",
    "Country": "LA",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "HP",
    "Country": "TW",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "Oklahoma",
    "Country": "SG",
    "Date": "8/23/2023"
    },
    {
    "Vendor": "Employment Security",
    "Country": "TH",
    "Date": "8/24/2023"
    },
    {
    "Vendor": "HP",
    "Country": "TH",
    "Date": "8/24/2023"
    },
    {
    "Vendor": "Minnesota",
    "Country": "SG",
    "Date": "8/24/2023"
    },
    {
    "Vendor": "HP",
    "Country": "SG",
    "Date": "8/24/2023"
    },
    {
    "Vendor": "Illinois",
    "Country": "SA",
    "Date": "8/24/2023"
    },
    {
    "Vendor": "Workforce",
    "Country": "SA",
    "Date": "8/25/2023"
    },
    {
    "Vendor": "HP",
    "Country": "SA",
    "Date": "8/25/2023"
    },
    {
    "Vendor": "Workforce",
    "Country": "SA",
    "Date": "8/25/2023"
    },
    {
    "Vendor": "Illinois",
    "Country": "KH",
    "Date": "8/25/2023"
    }
    ]

     

    Select and compose:

     

    DamoBird365_1-1693324346528.png

     

    The apply to each takes the compose as input:

     

    DamoBird365_2-1693324387005.png

    The HTML table is based on the filter array and the compose table is the current item, <br> and the output from the create html table.

     

    The compose all tables - outside of the apply to each is as follows:

    DamoBird365_3-1693324446806.png

     

    Here is the output:

    DamoBird365_4-1693324483967.png

    Hope that helps and don't forget to marked as solved 😉


    Cheers
    Damien


    Please take a look and subscribe to my YouTube Channel for more Power Platform ideas and concepts. Thanks

     

  • Jagen007 Profile Picture
    16 on at

    If I would not like to convert into a JSON since it is extracting it from an excel file. I would like to remain using ur method. In my apply to each compose step, what should be the code?

     

    This is my existing flow:

    Jagen007_1-1693328222695.png

     

    Jagen007_0-1693328169243.png

     

     

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    Hi @Jagen007 

     

    In my example I used a compose with a json array, instead of list rows. Both return an array. It looks like you’ve built the flow correctly and are creating a table per date but you are missing a compose in the apply to each for the html table and date header and then another compose outside of the apply to each. I have the screenshots in the original post.

     

    I note you’ve posted another post? Have your requirements changed?

     

    Damien

  • Jagen007 Profile Picture
    16 on at

    Yes Damien, my request has changed but i would like to understand the methodology how to move forwards. Hence I have uploaded the raw data in excel. 

  • DamoBird365 Profile Picture
    8,942 Microsoft Employee on at

    @Jagen007 I will let others support you with your new request as I believe I have demonstrated in this post how to achieve what you were looking for. Good luck with your development.

     

    Damien

  • Jagen007 Profile Picture
    16 on at

    @DamoBird365  kindly really need your help on the new development due I'm still having error my end. I followed ur steps according but yet i can't obtain the desired output. 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard