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
Anonymous
Not applicable

Split value over month using a distribution key - HELP

Hello everybody, 

 

I really hope you can help me with this problem, which seems pretty complicated for me. 

stherkildsen_0-1610371236404.png

What I want to to is split the weightamount out on different month in the furture based on the expected number of hours. 

I have following distribution key for expected hours: 
0-500 = 2 month

500-1500 = 4 month

1500 - 4000 = 6 month

4000 - above = 8 month. 

 

So forexample: in the above observation the start date is 01/05 and expected hours of 6,48 therefore weightamount should be split over 2 month ->  Month 5 = 2592 and Month 6 = 2592. 

 

Anyone who have a solution to this, or can point me in the right direction? Should i maybe create a seperate calendar table? 

 

Important note: If it is the first of the month then it should be allocated to that month. So for the above exapmle because it is the first of the monst (01/05) then it should be allocated to month 5 and 6, but if the start date wat 07/05 then i should have been allocated to month 6 and 7.

 

The final output should be a graph like this, so i can see how many hours we expect to have en the future: 

stherkildsen_2-1610371771836.png

 

Thanks!

 

1 REPLY 1
Stachu
Community Champion
Community Champion

let's start with the number of months
add the following table

Low High Months
0 500 2
500 1500 4
1500 4000 6
4000 99999999 8

and add following calculated column to your table

NrOfMonths =
VAR __expected = 'Table'[Expected Hours]
VAR __relevantSplit =
    FILTER ( 'Split', __expected > 'Split'[Low] && __expected <= 'Split'[High] )
RETURN
    CALCULATE ( MAX ( 'Split'[Months] ), __relevantSplit )

It should give you the expected number of months for each row. If you can add the table using M then we can also replace 99999999 with +infinity

now for the allocation - do you want to create a calculated table, or are you looking for a measure that would assign the values to particular dates?



Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Helpful resources

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

June 2025 community update carousel

Fabric Community Update - June 2025

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