cancel
Showing results for
Did you mean:
Helper IV

## 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.

 Person Amount of leave Hourrate Begin contract eind contract a 20 20 1-1-2010 b 20 15 1-2-2020 c 40 25 1-6-2019 31-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.

1 ACCEPTED SOLUTION
Super User IV

Not really. But perhaps:

Or maybe:

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Super User IV

Not really. But perhaps:

Or maybe:

See if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

---------------------------------------

##### I have a NEW book! DAX Cookbook from Packt
Over 120 DAX Recipes!

Proud to be a Super User!

Announcements

#### 2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

#### Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

#### Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors