Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Answered

insert multiple columns that subtract previous columns

(0) ShareShare
ReportReport
Posted on by 4

Hello - I have 50+ columns that I need to calculate the difference after every 2 columns. Currently I appended my tables in Power Query and it looks like this:

 DRAFT  ACTUAL  DRAFT  ACTUAL 
                  10                  15                  20                  10
                     5                     4                  30                100
                     1                     2                  40                  50

I need it to do this:

 DRAFT  ACTUAL  DIFF  DRAFT  ACTUAL  DIFF 
                  10                  15                   (5)                  20                  10                  10
                     5                     4                     1                  30                100                 (70)
                     1                     2                   (1)                  40                  50                 (10)

 

I can add a custom column in Power query but it shows up at the end of the table and then I have to move it. Also, it is very manual and I have to do this for 50+ columns on 50+ files.

  • fparkington Profile Picture
    4 on at
    Re: insert multiple columns that subtract previous columns

    I should add that each of my files has a different number of columns as well. So if I can automate to add this difference column for any number of iterations as there is data, that is what I want to do.

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

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 Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
SD-13050734-0 Profile Picture

SD-13050734-0 6

#3
Jon Unzueta Profile Picture

Jon Unzueta 2

Overall leaderboard

Featured topics