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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
heygowtam
Helper II
Helper II

DAX for Remaining Month Calculation

If an employee joins in the mid of the financial year we give him an Annual Leave benefit Based on 


annual leave =  [Month when the employee joined]- [JULY (End of Finacial Year )] * 1.67/Month 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@heygowtam , Try a new column

Leaves =

var _date= [Join Date]

var _eoy =  if(month(_date) <=7, Date(Year(_date),7,31) , Date(Year(_date)+1,7,31) )

return

(datediff(_date, _eoy,Month)+1) *1.67

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

View solution in original post

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

Hi @heygowtam ,

 

Whether the advice given by @amitchandak  has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.


Looking forward to your feedback.


Best Regards,
Henry

amitchandak
Super User
Super User

@heygowtam , Try a new column

Leaves =

var _date= [Join Date]

var _eoy =  if(month(_date) <=7, Date(Year(_date),7,31) , Date(Year(_date)+1,7,31) )

return

(datediff(_date, _eoy,Month)+1) *1.67

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
lukiz84
Memorable Member
Memorable Member

and the question is...? 😉

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.