Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Power Query
Unanswered

SUM formulas based on IF/AND conditions

(0) ShareShare
ReportReport
Posted on by 2

Hi All,

 

Hoping to find some help here. I am fairly proficient writing formulas in excel, however, I now use PQE a lot. I am looking to replicate work I have done previously in excel, using only excel, by incorporating PQE to manage most of the work for me. I am slowly making ground with PQE syntax but I am yet to understand how to stack formulas and how to perform SUMS within a formula. An example of one of my excel formulas, which I wish to replicate in PQE is below. Could somebody perhaps translate this to a working PQE formula, from which I can start to understand the structure and workings of PQE formulas.

 

=IF(AND([@[Rent Review Date]]<Months!$B$1,[@[Rent Review Date]]>Months!$A$1),SUM([@[Previous Rent]]/12)+SUM([@[New Rent]]-[@[Previous Rent]])/366*[@[New Days]],IF([@[Review Date]]>Months!$B$1,SUM([@[Previous Rent]]/12),[@[New Rent]]/12))

 

I use this to determine what value of rent is due in a month based on whether or not an increase occurs in the given month. All of the data in PQE mirrors column names, tab references etc.

 

Thanks in advance.

  • Royle79 Profile Picture
    2 on at
    Re: SUM formulas based on IF/AND conditions

    I managed to solve this, I thought there would be some more complexity to it. My solution;

     

    if [Rent Review Date]< #date (2024,4,30) and [Rent Review Date] > #date (2024,4,1) then ([Previous Rent]/12) + ([New Rent]-[Previous Rent])/ 365 *[Days New Rent] else if [Rent Review Date] > #date (2024,4,30) then [Previous Rent] / 12 else [New Rent Monthly]

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