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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Auto_queen
Helper I
Helper I

dax formula to allocate income to future dates

I'm having a difficult time with this and I don't know why. At the beginning of each year people get awarded units. They vest over 4 years starting the next year, 25%/year. I want to be able to show in a matrix table the amount of units vested per year even in the future, and I'm having trouble. 
I've added two calculated columns for Vesting Start Date and Vesting End Date. I've connected my table to a Date table. Nothing is working. 

Here is an example of my table: 

Grant IDGrant DateUserUnits Awarded
11/1/2020User12500
21/1/2021User15000
31/1/2022User18000
11/1/2020User21000
21/1/2021User22500

 

Here is an example of what I want to see: Filtered by User1

Grant ID202120222023202420252026
1625625625625  
2 1250125012501250 
3  2000200020002000


I tried this formula in addition to others but nothing is working. 

Vested Units =
VAR _year1 = DATEADD('User Units'[Grant Date],1,YEAR)
VAR _year4 = DATEADD('User Units'[Grant Date],4,YEAR)
VAR _vestedunits = [Total Units Awarded] *.25
RETURN
IF(SELECTEDVALUE(Table1[Vesting Dates].[Date]) >= _year1 || SELECTEDVALUE(Table1[Vesting Dates].[Date]) <= _year4, [Total Units Awarded]*.25,"")
2 ACCEPTED SOLUTIONS
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file if it suits your requirement.

Jihwan_Kim_2-1702958076840.png

 

 

Jihwan_Kim_1-1702958064390.png

 

 

expected result measure: =
SUMX (
    CROSSJOIN (
        SUMMARIZE ( 'User Units', 'User'[User], 'User Units'[Grant ID] ),
        VALUES ( 'Calendar'[Year] )
    ),
    CALCULATE (
        VAR _awardtyear =
            YEAR ( MAX ( 'User Units'[Grant Date] ) )
        VAR _startyear = _awardtyear + 1
        VAR _finishyear = _awardtyear + 4
        VAR _award =
            SUM ( 'User Units'[Units Awarded] )
        VAR _25percent = _award / 4
        RETURN
            IF (
                MAX ( 'Calendar'[Year] ) >= _startyear
                    && MAX ( 'Calendar'[Year] ) <= _finishyear,
                _25percent
            )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

Fowmy
Super User
Super User

@Auto_queen 

Please find below the allocation measure which also considers the Dates table relationship to filter the allocation years.

Allocation = 
var __years = VALUES(Dates[Year])
RETURN
CALCULATE(
    SUMX(
        ADDCOLUMNS(
            GENERATE(
                SUMMARIZE( Table1 , Table1[User] , Table1[Grant ID] , Table1[Grant Date]),
                  FILTER( GENERATESERIES( YEAR( Table1[Grant Date])+1 , YEAR( Table1[Grant Date])+4  ), [Value] in __years )
            ),
            "Amount",DIVIDE( CALCULATE(SUM(Table1[Units Awarded])), 4 )
        ),
        [Amount]
    ),
    REMOVEFILTERS(Dates)
)

Fowmy_0-1702979246513.png

File attached below.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

3 REPLIES 3
Auto_queen
Helper I
Helper I

Thank you so much! Both ways worked! I learned a lot from your work. Thank you! 

Fowmy
Super User
Super User

@Auto_queen 

Please find below the allocation measure which also considers the Dates table relationship to filter the allocation years.

Allocation = 
var __years = VALUES(Dates[Year])
RETURN
CALCULATE(
    SUMX(
        ADDCOLUMNS(
            GENERATE(
                SUMMARIZE( Table1 , Table1[User] , Table1[Grant ID] , Table1[Grant Date]),
                  FILTER( GENERATESERIES( YEAR( Table1[Grant Date])+1 , YEAR( Table1[Grant Date])+4  ), [Value] in __years )
            ),
            "Amount",DIVIDE( CALCULATE(SUM(Table1[Units Awarded])), 4 )
        ),
        [Amount]
    ),
    REMOVEFILTERS(Dates)
)

Fowmy_0-1702979246513.png

File attached below.

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file if it suits your requirement.

Jihwan_Kim_2-1702958076840.png

 

 

Jihwan_Kim_1-1702958064390.png

 

 

expected result measure: =
SUMX (
    CROSSJOIN (
        SUMMARIZE ( 'User Units', 'User'[User], 'User Units'[Grant ID] ),
        VALUES ( 'Calendar'[Year] )
    ),
    CALCULATE (
        VAR _awardtyear =
            YEAR ( MAX ( 'User Units'[Grant Date] ) )
        VAR _startyear = _awardtyear + 1
        VAR _finishyear = _awardtyear + 4
        VAR _award =
            SUM ( 'User Units'[Units Awarded] )
        VAR _25percent = _award / 4
        RETURN
            IF (
                MAX ( 'Calendar'[Year] ) >= _startyear
                    && MAX ( 'Calendar'[Year] ) <= _finishyear,
                _25percent
            )
    )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
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 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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