March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
07-25-2017 05:40 AM - last edited 07-25-2017 05:49 AM
Last-Year-to-date performance measure
Calculate the sum of some column containing numerical values from 1/1 last year up until today's date last year.
Name: Base value
Tooltip: The value you want to measure last-year-to-date performance on
Type: Numerical field / measure
Name: Dates
Tooltip: The dates you want to use for the year-to-date period. The last-year-to-date measure assumes that you have atleast 2 years within your data set.
Type: Date field
First you create the year-to-date measure (referring to my post about year-to-date😞
SUM {Base value} YTD =
Calculate(
SUM({Base value}),
DATESYTD({Dates})
)
Then you create the last-year-yo-date measure based on the year-to-date measure:
SUM {Base value} LYTD =
Calculate(
[SUM {Base value} YTD],
DATEADD({Dates};-1;YEAR)
)
If you take a look at the .pbix, you'll find syntax for creating a time dimension and making the monthname + year column.
Don't hesitate to ask about the measure. I'll gladly elaborate on anything regarding it.