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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DianaT
Helper I
Helper I

How to calculate the number of installments based on installment frequency, start date and end date

Hi all,

 

I have a data list that contains the following fields:

 

AmountApplicationInstallment frequencyInstallments start dateInstallments end date
$400.00Recurring giftYearly25/10/202023/09/2023
$27.78Recurring giftMonthly25/10/202025/09/2023
$30.00Recurring giftMonthly25/10/202025/09/2023
$2,000.00Recurring giftYearly25/10/202025/09/2022
$55.55Recurring giftMonthly25/10/202025/09/2023
$10.00Recurring giftMonthly25/10/2020 
$20.00Recurring giftMonthly25/10/202025/09/2022
$150.00Recurring giftYearly25/10/2020 
$30.00Recurring giftMonthly25/10/202025/09/2023
$15.00Recurring giftMonthly25/10/2020 

 

Is it possible to create a calculated column that reflects the number of installment involved for each of these gifts (either to the end-date or up to 5 years where there is no end-date or the end-date is more than 5 years)?

 

Ultimately I am trying to use the number of instalment to calculate the total amount of gift committed. 

 

For example:
- a monthly gift of $30 for three years would look like this = $30 x 36 = $1080
- an annual gift of $300 for three years would look like this = $300 x 3 = $900

 

Any help will be greatly appreaciated. Thank you.

 

Diana

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,

 

You can try this:

New Column =
VAR CountMonthlyInstallments =
DATEDIFF (
'Table'[Installments start date],
'Table'[Installments end date],
MONTH
) + 1
VAR CountYearlyInstallments =
DATEDIFF (
'Table'[Installments start date],
'Table'[Installments end date],
YEAR
)
RETURN
IF (
NOT ( ISBLANK ( 'Table'[Installments end date] ) ),
SWITCH (
'Table'[Installment frequency],
"Monthly", CountMonthlyInstallments * 'Table'[Amount],
"Yearly", CountYearlyInstallments * 'Table'[Amount]
)
)

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

HI @DianaT,

It sounds like a common data analysis requirement across the date range from multiple date fields. You can take a look at the following blog 'start date', 'end date' part if it meets your requirement:

Before You Post, Read This 

In addition, you can also try to create a new table to expand the date range then you can simply calculate the values based on the new table date fields:

Spread revenue across period based on start and end date, slicer and dase this using different dates 
Regards,
Xiaoxin Sheng

Thank you Xiaoxin. These references are very useful.

DianaT
Helper I
Helper I

@IreneNordOne, this is really great and very close to what I'm looking for!

 

At the last part of the DAX, I tried to incorporate an extra condition to specify what happened when end date is blank, like this:

 

IF ( ISBLANK ( 'Table'[Installments end date] ) ),
SWITCH (
'Table'[Installment frequency],
"Monthly", 60 * 'Table'[Amount],
"Yearly", 5 * 'Table'[Amount]
)
)

 

Is this do-able? I've been learning DAX for a good couple months now and find incoporating multiple conditions or filters in one DAX very tricky...

 

Thank you so much for your help.

 

Cheers,
Diana

PREVIEW
 
 
 
Anonymous
Not applicable

Hi,

 

You can try this:

New Column =
VAR CountMonthlyInstallments =
DATEDIFF (
'Table'[Installments start date],
'Table'[Installments end date],
MONTH
) + 1
VAR CountYearlyInstallments =
DATEDIFF (
'Table'[Installments start date],
'Table'[Installments end date],
YEAR
)
RETURN
IF (
NOT ( ISBLANK ( 'Table'[Installments end date] ) ),
SWITCH (
'Table'[Installment frequency],
"Monthly", CountMonthlyInstallments * 'Table'[Amount],
"Yearly", CountYearlyInstallments * 'Table'[Amount]
)
)

amitchandak
Super User
Super User

@DianaT , if need to split the data month-wise, refer to the file attached. I have done it from date range to the day, you have to do only once in a month. so add filter [date] =eomonth([date],0)

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors