Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Calculate value based on months between two date values with month selection

HI you all,

 

I am trying to create an overview to calculate the monetary value of the outstanding leave of persons for the year 2020. 

In the top of my report I have a month slicers in which you can select the months of this year. 

PersonAmount of leaveHourrateBegin contracteind contract
a20201-1-2010 
b20151-2-2020 
c40251-6-201931-3-2020

 

Sow if I would want to know the value of outstanding leave for Januari the calculation should look like this:

Person a: 12 months in contract for 2020= (20*20)/12 = 33.333

Person B: Has no contract =0

Person C: 3months of contact for 2020 = (40*25)/3=333.33

 

For UNTIL April 

Person a: 12 months in contract for 2020 and 4 past= ((20*20)/12) *4 = 133.333

Person b: 11 months in contract for 2020 and 3 past= ((20*15)/11)*3=  81.81

Persen C=  Has no contract =0

 

I hope i have explained it clearly and you can help me.