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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

DAX working with two dates

I was working on a dax problem.
I have the resource allocation from start date to end date....
I need to consider the average meaning divide by 12, However when we have start date or end date in between the year we need to sum up for the months available and divide By 12

example

resource allocation               start date                    end date
0.3                                       Aug 2021                       March 2023

the result should show the allocation for 2021 0.3*5/12=0.125
the result should show the allocation for 2022 0.3*12/12=0.3
the result should show the allocation for 2023 0.3*3/12=0.075

1 ACCEPTED SOLUTION

@Anonymous , refer if these approaches can help

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM


Tables way
https://amitchandak.mediumcom/dax-get-all-dates-between-the-start-and-end-date-8f3dac4ff90b
https://amitchandak.medium.com/power-query-get-all-dates-between-the-start-and-end-date-9ad6a84cf5f2

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
FreemanZ
Super User
Super User

hi @Anonymous 

are you expecting a measure? if so, what context do you have for that measure or how are  you going to use that measure?

Anonymous
Not applicable

@FreemanZ  
yes I am expecting a measure.. ill be using a matrix with all attributes as rows, year as column and measure as values

@Anonymous , refer if these approaches can help

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM


Tables way
https://amitchandak.mediumcom/dax-get-all-dates-between-the-start-and-end-date-8f3dac4ff90b
https://amitchandak.medium.com/power-query-get-all-dates-between-the-start-and-end-date-9ad6a84cf5f2

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.

Top Solution Authors
Top Kudoed Authors