Našimi kurzy prošlo více než 10 000+ účastníků
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
This is about the SAMEPERIODLASTYEAR function. As can be seen from its long name, we can use it to compare some indicators year-on-year. Its result generally makes no sense as itself – it usually makes sense with some other function like CALCULATE and with some of the visuals in Power BI (or Pivot Table in Excel – it it´s based on Data Model).
Let´s start with this table:
We are going to create this table comparing year-on-year results.
How to do it? We will start with new measure creation:
Because:
You can simply subtract Revenue and “Previous period” measure and see the improvement. Any way, at the end we have to use some visual to present the results – as can be seen on the second image.
SAMEPERIODLASTYEAR can be little bit weird when working with filters / slicers. More about this problem and its solution is here.
Comments are closed.
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Pište kdykoliv. Odpovíme do 24h
© exceltown.com / 2006 - 2023 Vyrobilo studio bARTvisions s.r.o.
Wonderful post! Is possible to modify this calculations to integrate a parameter (say “year choice”), which will then the be year used instead of simply the previous year of the same period?
Probably the PARALELLPERIOD function can be useful.
Thank you for this wonderful post. Question. What if I want to display current vs prior year number by LOB? Currently every row is repeating totals figure for prior year for each LOB. Thanks
Thank you! This really worked!! <3
Great explanation!
Thx, it help me a lot