5 Replies Latest reply: Feb 2, 2016 8:20 AM by Sunny Talwar

To find the difference between two months

Hi,

Actually my scenario is a car vendor sales.The payment type consists of cash and emi.While considering this emi case,i have included the monthly payments value for each emi in fact table.

I have created a master calendar linked with order date.So when i click on a customer who took a car,it is showing the orderdate,month,quarter,year of the car taken.

But i want to find the emi paid by that particular customer till 4 months while the EMI may be about 12 months.But now the problem is that if i want to see the amount paid till may,if i click on the month may it is showing all the customers who bought the car in the month.

Could anyone suggest in which way i could get the amount paid using the expression like

=if(Type='EMI',([Down Payment]+(GetCurrentSelections(Month)-Month([Order Date]))*Monthly_Payment),Selling_Price)

Thank you.

• Re: To find the difference between two months

Yaa But I want to find the difference between Order Date and the Selected month

• Re: To find the difference between two months

You are looking to do Month - Month or MonthYear - MonthYear? If its MonthYear, then may be this:

Num(((Year(MonthYear) * 12) + Month(MonthYear)) - (((Year([Order Date]) * 12) + Month([Order Date]))) + 1)

• Re: To find the difference between two months

Thank You Sunny.It's Working now

• Re: To find the difference between two months

Awesome