Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi, been a long time since posting here, but here goes;
I have three tables:
Transactions:
Employee:
and Date (standard date table), with these relationships:
I have one measure:
Salary increase per year =
VAR thisyear =
CALCULATE ( SUM ( transactions[Amount] ) )
VAR lastyear =
CALCULATE ( SUM ( transactions[Amount] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
VAR rawcalc = ( thisyear - lastyear ) / lastyear
RETURN
IFERROR ( rawcalc, BLANK () )
I think I need to filter "this" years totals based on the individuals having a sum in the previous year, but every variant i try seems to be a dead end.
Any insights are much appreciated!
Solved! Go to Solution.
Thanks for your assistrance @Greg_Deckler
I sorted it out when reading this.
https://p3adaptive.com/2015/08/nested-sumx-or-dax-query/
Thanks for your assistrance @Greg_Deckler
I sorted it out when reading this.
https://p3adaptive.com/2015/08/nested-sumx-or-dax-query/
@fcastle Try:
Salary increase per year =
VAR thisyear =
CALCULATE ( SUM ( transactions[Amount] ) )
VAR lastyear =
CALCULATE ( SUM ( transactions[Amount] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
VAR rawcalc = ( thisyear - lastyear ) / lastyear
RETURN
IF(ISBLANK(lastyear),BLANK(),IFERROR ( rawcalc, BLANK () ))
Thanks but issue persists. I think the key is to find a way to pass a list of dimensions (employeeid) to a sum measure.
@fcastle Perhaps:
Salary increase per year =
VAR __Table = SUMMARIZE('transactions',[employeeid],"increase",
VAR thisyear =
CALCULATE ( SUM ( transactions[Amount] ) )
VAR lastyear =
CALCULATE ( SUM ( transactions[Amount] ), SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
VAR rawcalc = ( thisyear - lastyear ) / lastyear
RETURN
IF(ISBLANK(lastyear),BLANK(),IFERROR ( rawcalc, BLANK () )))
RETURN
SUMX(__Table,[increase])
@fcastle Paste the sample data as text or provide a link to the sample PBIX table so I can recreate.
first; thank you very much for helping out a mate, greatly appreciated!
link to sample file:
https://1drv.ms/u/s!AtjU9aGZ2mSSgRqKvKE8ZC7ZLQZB?e=XTnfo9
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 42 | |
| 36 | |
| 35 |