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! Learn more
Hello!
My target is to create a new column, which shall contain the value of the previous year and group.
Any ideas?
Solved! Go to Solution.
Hi @Anonymous ,
Here are the steps you can follow:
1. Enter Power Query through Transform data, Add column -From 1.
2. Create calculated column.
rankx = RANKX(FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])),'Table'[Index],,ASC)Average in Last Year =
CALCULATE(SUM('Table'[Average in Year]),FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])-1&&'Table'[rankx]=EARLIER('Table'[rankx])))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
Here are the steps you can follow:
1. Enter Power Query through Transform data, Add column -From 1.
2. Create calculated column.
rankx = RANKX(FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])),'Table'[Index],,ASC)Average in Last Year =
CALCULATE(SUM('Table'[Average in Year]),FILTER(ALL('Table'),'Table'[Year]=EARLIER('Table'[Year])-1&&'Table'[rankx]=EARLIER('Table'[rankx])))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @Anonymous ,
the individual rows are not unique.
Should the value for the Group per year not be unique?
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
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.