Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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.
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 ID | Grant Date | User | Units Awarded |
1 | 1/1/2020 | User1 | 2500 |
2 | 1/1/2021 | User1 | 5000 |
3 | 1/1/2022 | User1 | 8000 |
1 | 1/1/2020 | User2 | 1000 |
2 | 1/1/2021 | User2 | 2500 |
Here is an example of what I want to see: Filtered by User1
Grant ID | 2021 | 2022 | 2023 | 2024 | 2025 | 2026 |
1 | 625 | 625 | 625 | 625 | ||
2 | 1250 | 1250 | 1250 | 1250 | ||
3 | 2000 | 2000 | 2000 | 2000 |
I tried this formula in addition to others but nothing is working.
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file if it suits your requirement.
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
)
)
)
@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)
)
File attached below.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Thank you so much! Both ways worked! I learned a lot from your work. Thank you!
@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)
)
File attached below.
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi,
Please check the below picture and the attached pbix file if it suits your requirement.
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
)
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
8 |
User | Count |
---|---|
17 | |
12 | |
11 | |
11 | |
10 |