Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello DAX professionals,
I'm new to DAX and struggling with the following problem: I want to create a measure that repeats the monthly values of a specific year of a given time series in all years after that specific year.
For instance, I have a series of consecutive numbers from January 2018 on, and I want to create another measure that repeats only the values of the year 2018 for each month in the consecutive years to come:
I found SAMEPERIODLASTYEAR, but that's not exactly what I want.
Solved! Go to Solution.
@Anonymous , Create a measure like this with help from date table and try
Year/s behind Sales = CALCULATE(SUM(Table[time series]),dateadd('Date'[Date],2008- max('Date'[year]),Year))
or
= CALCULATE(SUM(Table[time series]),filter(allselected('Date'),'Date'[year] = 2008 && 'Date'[Month] =max('Date'[Month])))
@Anonymous , Create a measure like this with help from date table and try
Year/s behind Sales = CALCULATE(SUM(Table[time series]),dateadd('Date'[Date],2008- max('Date'[year]),Year))
or
= CALCULATE(SUM(Table[time series]),filter(allselected('Date'),'Date'[year] = 2008 && 'Date'[Month] =max('Date'[Month])))
Perfect, your first solution worked for me. Thank you!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |