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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
BobKoenen
Helper IV
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. 

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. 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Not really. But perhaps:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/td-p/409364

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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

Not really. But perhaps:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Open-Tickets/td-p/409364

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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.