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 Apps / YTD sum of columns in ...
Power Apps
Unanswered

YTD sum of columns in Power Query based on input from Excel

(0) ShareShare
ReportReport
Posted on by 2

I hope I have the correct forum.

Within Power Query I am trying dynamically add columns based on an input from Excel.

 

The input would be something like this from a cell within Excel (I point a query to this cell)

JeremyHillier_1-1642017438455.png

The above could be selected as Jan, Feb, Mar etc to Dec.

 

The data has this structure:

 JanFebetc.NovDecYTD 

Sales

100100 

100

100200 
Expenses5050 5050100 
        

 

I would like to sum the columns Jan to Feb (in this example) into the YTD column dynamically based on the earlier input.

 

Is this possible?

The formula is easy in Excel but I'm struggling within Power Query.

What is the M formula?

 

Thanks in advance for any help

 

 

Categories:
I have the same question (0)
  • JeremyHillier Profile Picture
    2 on at

    Brilliant! Thank you for your help - works perfectly

  • caroltxy Profile Picture
    8 on at

    I faced the same struggling here..thks for the question and answer. 


    question - wonder the excelQuery coding here is referring to the name manager i have to create in excel?(option list created in Excel)? 

    many thanksss

    excelQuery

     

  • caroltxy123 Profile Picture
    2 on at

    sorry to ask silly question here (i'm first time P.Query user)

     

    i failed with the code....Can anyone advise? many thanksss alot...

    caroltxy123_0-1667972141121.png

     

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard