Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Answered

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

 

 

  • caroltxy123 Profile Picture
    2 on at
    Re: YTD sum of columns in Power Query based on input from Excel

    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

     

  • caroltxy Profile Picture
    8 on at
    Re: YTD sum of columns in Power Query based on input from Excel

    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

     

  • JeremyHillier Profile Picture
    2 on at
    Re: YTD sum of columns in Power Query based on input from Excel

    Brilliant! Thank you for your help - works perfectly

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 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…

Leaderboard > Power Apps - Power Query

#1
mmbr1606 Profile Picture

mmbr1606 9 Super User 2025 Season 1

#2
stampcoin Profile Picture

stampcoin 7

#3
SD-13050734-0 Profile Picture

SD-13050734-0 6

Overall leaderboard

Featured topics