Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Raja_Rizwann
Regular Visitor

Dax for Calculation of Total Monthly Rent= (Regular Rent of the month +Advance Paid in Previous Mont

Dear Dax Community,
Greeting to all.
I am facing a problem in Calculation of My Total Rent payment for the Month in my rent payment Table . Table is maintained in Excel and i am attaching the table. I want to dynamically calculate the Total Monthly Rent (Monthly Allocation+Advance Rent Paid in previous Month that belong to or fall in current month).

Raja_Rizwann_1-1739617359872.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Raja_Rizwann 

Did the following output is the result you want?

vxinruzhumsft_0-1739759011869.png

 

Total Rent in Next Moth =
VAR a =
    EOMONTH ( 'Table'[Next Mont Date], 0 )
VAR b =
    MAXX (
        FILTER (
            'Table',
            EOMONTH ( [Due Date], 0 ) = a
                && [Prop ID] = EARLIER ( 'Table'[Prop ID] )
        ),
        [Monthly Allocaton]
    )
RETURN
    [Next Month Monthly rent] + b

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
speedramps
Super User
Super User

I have loaded you data into PBIX on Onedrive

Click here 

 

Your expalanation is too vague.

Please ask you manager, teacher, parents or friend to help.

You will get a quick response if you put time, care and effort into writing clear problem descriptions with example data. Vague questions may waste you time and helpers time.

Look forward to helping you when the above information is forthcoming.

speedramps
Super User
Super User

We want to help you but your description is too vague. Please write it again clearly.


Provide example input data as table text (not a screen print) so we can import the data to build a solution for you.

Remove any unneeded columns which may cause confusion.


Explain how the 67666.67 is calculated in plain language (do not copy and paste DAX or Excel formula)
 
Also provide the example desired output, with a clear step-by-step description of calculations the process flow.
Remember not to share private data ... we don't want you to get into trouble. ‌‌
Take time and care to use the same table and field names in the input, output and description so we can understand your problem and help you.
Try keep it simple and ask one question per ticket.
You will get a quick response if you put time, care and effort into writing clear problem descriptions with example data.

Look forward to helping you when the above information is forthcoming

a

 

ok Sir noted your instruction.  i am copy pasting Table . This is sample table not real data.
In the table i need the Total Rent Payment in last column . Critaria is if cover month is more than 1 than un amortized rent or advance rent that falls in next month should be added withe regular monthly allocaton  r. 

 

simply sum of  regular monthly allocation plus advance paid in last month based on critaria if cover month is more than 1 and Due date and Next month date (YYYY-MMM) should be same

Prop IDDue DateTotal Rent PaidCover MonthsMonthly AllocatonNext Mont DateNext Month Monthly rentTotal Rent in Next Moth
P-0115-Jan-24225500211275015-Feb-24112750 
P-0115-Mar-24225500211275015-Apr-24112750 
P-0115-May-24225500211275015-Jun-24112750 
P-0115-Jul-24225500211275015-Aug-24112750 
P-0115-Sep-24225500211275015-Oct-24112750 
P-0115-Nov-24225500122550015-Dec-240 
P-0105-Feb-24135333267666.505-Mar-2467666.5 
P-0105-Apr-24135333267666.505-May-2467666.5 
P-0105-Jun-24135333267666.505-Jul-2467666.5 
P-0105-Aug-24135333267666.505-Sep-2467666.5 
P-0105-Oct-24135333267666.505-Nov-2467666.5 
P-0105-Dec-24135333113533305-Jan-250 
Anonymous
Not applicable

Hi @Raja_Rizwann 

Did the following output is the result you want?

vxinruzhumsft_0-1739759011869.png

 

Total Rent in Next Moth =
VAR a =
    EOMONTH ( 'Table'[Next Mont Date], 0 )
VAR b =
    MAXX (
        FILTER (
            'Table',
            EOMONTH ( [Due Date], 0 ) = a
                && [Prop ID] = EARLIER ( 'Table'[Prop ID] )
        ),
        [Monthly Allocaton]
    )
RETURN
    [Next Month Monthly rent] + b

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.