Skip to main content

Notifications

Community site session details

Community site session details

Session Id : cZ5aTNw14h0q7NwEd/+u3Z
Power Automate - Building Flows
Answered

Delete multiple columns from data table

Like (0) ShareShare
ReportReport
Posted on 15 Feb 2025 17:18:23 by 20
I have data table as a variable scraped from an html table
 
How do I delete the first 3 columns using Index?
 
Do I have to add an action for each column?  If so is the index o each time, or is it 0 in action 1, 1 in action 2, etc.?
  • Verified answer
    eetuRobo Profile Picture
    3,264 Super User 2025 Season 1 on 19 Feb 2025 at 17:08:39
    Delete multiple columns from data table
    @CU15021716-0 Good to hear that you figured it out
     
    (maybe because I ticked the box to 'Enable Power FX' when I created the flow?)
    Yes that exactly right. With Power Fx the indexing starts from 1 rather than in the regular flow where it starts from 0.

     
  • CU15021716-0 Profile Picture
    20 on 19 Feb 2025 at 14:32:03
    Delete multiple columns from data table
    @eetuRobo Thanks for your reply,
     
    I found it didn't work like that for me (PAD v2.52) -
     
    It wouldn't accept 0 as the first column.  I had to create 3 'Delete column' actions, each specifying column 1.
     
    (maybe because I ticked the box to 'Enable Power FX' when I created the flow?)
  • Suggested answer
    eetuRobo Profile Picture
    3,264 Super User 2025 Season 1 on 19 Feb 2025 at 14:15:00
    Delete multiple columns from data table
    Yes datatable indexing starts from 0 so first column would be 0, second 1 and third 2. To delete a column you can use "Delete column from data table" -action.

    So if you want to delete multiple columns you should either delete the index 0 three times in a row or delete first the highest column index and go from the top down. Because if you delete the first column then the second column will become index 0 and third column will be index 2.

    For example I extract html table and want to delete first three columns:



    I can do it like this:


    Or loop the deletion of index 0 for three times:


    Then I will have removed the first three columns:

     

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Automate - Building Flows

#1
stampcoin Profile Picture

stampcoin 51

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 39 Super User 2025 Season 1

#3
Chriddle Profile Picture

Chriddle 21 Super User 2025 Season 1

Overall leaderboard
Loading started