Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI All,
I am setting up a calculation group and am looking for ONE measure which gives me the running total of previous year. I cannot reference another cumulative measure and use SAMEPERIODLASTYEAR. So I only have the [total sales] measure which I want to refrence in the new cumulative last year measure.
I Want to accomplish this
| Month | This year RT | Previous year RT |
| 1 | 2 | 4 |
| 2 | 5 | 6 |
| 3 | 7 | 8 |
| 4 | 9 | 9 |
| 5 | 11 | 11 |
| 6 | 14 | 12 |
| 7 | 17 | 15 |
| 8 | 19 | 18 |
| 9 | 30 | 22 |
Hope you can help me
Solved! Go to Solution.
A more specific expression can be provided with example data that has you Date and Sales Tables/Column, but you can get a PY RT with an expression like this. Note this assume you have a Date table, marked as a date table.
PY RT =
VAR vThisDate =
MAX ( Date[Date] )
VAR vPYThisDate =
EDATE (
vThisDate,
-12
)
VAR vPYStart =
DATE ( YEAR ( vPYThisDate ), 1, 1 )
VAR vResult =
CALCULATE (
[Total Sales],
FILTER (
ALL ( Date[Date] ),
Date[Date] >= vPYStart
&& Date[Date] <= vPYThisDate
)
)
RETURN
vResult
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
A more specific expression can be provided with example data that has you Date and Sales Tables/Column, but you can get a PY RT with an expression like this. Note this assume you have a Date table, marked as a date table.
PY RT =
VAR vThisDate =
MAX ( Date[Date] )
VAR vPYThisDate =
EDATE (
vThisDate,
-12
)
VAR vPYStart =
DATE ( YEAR ( vPYThisDate ), 1, 1 )
VAR vResult =
CALCULATE (
[Total Sales],
FILTER (
ALL ( Date[Date] ),
Date[Date] >= vPYStart
&& Date[Date] <= vPYThisDate
)
)
RETURN
vResult
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 17 | |
| 8 | |
| 8 | |
| 7 |