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!
Doing some transformations, I got the following table in the Power Query Editor:
Now, I am asked to create visualizations that include all measures in the data over time and to do Year-over-year calculations for all the measures.
I am not sure how to do both tasks.
For example, how could I use the table to do the year-over-year calculations for all the measures? I tend to use the DAX-Funtion SAMEPERIODLASTYEAR by creating a Measure, but don't know how to do that here (cannot use SUM or something like that over the Value column...).
Solved! Go to Solution.
Hi @Anonymous ,
Please add an index column in Power Query:
Please try following DAX:
YOY =
var cur_wert = 'Table'[Wert]
var pre_wert = CALCULATE(
MAX('Table'[Wert]),FILTER('Table','Table'[Index] = EARLIER('Table'[Index]) -1 && 'Table'[Measure] = EARLIER('Table'[Measure]))
)
return
DIVIDE(cur_wert - pre_wert,pre_wert)
Year-over-year calculations for all the measures:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please add an index column in Power Query:
Please try following DAX:
YOY =
var cur_wert = 'Table'[Wert]
var pre_wert = CALCULATE(
MAX('Table'[Wert]),FILTER('Table','Table'[Index] = EARLIER('Table'[Index]) -1 && 'Table'[Measure] = EARLIER('Table'[Measure]))
)
return
DIVIDE(cur_wert - pre_wert,pre_wert)
Year-over-year calculations for all the measures:
Best regards,
Yadong Fang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
selected year - calculate(sum(wert),measure="Revenue")
you must have date table
Previous year - calculate(selected year,sameperiodlastyear(datedim[date))
like wise create all measures
Proud to be a Super User!
Hi! @VijayP
i am not sure that I do understand you correctly.
You suppose to create a measure
selected year = calculate(sum(wert),measure="Revenue")
but this sums the entries of the column wert for all years and for Revenues...
Is this what it is supposed to be?
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.