Forum Discussion
Anonymous
3 years agoNot applicable
YOY - Year wise comparison
I have Five years data in the Excel . data has been loaded in to Power bi . i want find the percentage of YOY comparison. year vaule Month 2021 450 Jan -21 2...
johnt75
Super User
3 years agoSet up a proper date table and link it to your fact table. If the month column in your fact table isn't already a full date you need to convert it to be the first day of the month, and you can control how it displays using the format string.
Once you have the date table linked to the fact table, use columns from the date table in your visuals and you can create a measure like
YoY % =
VAR CurrentValue =
SUM ( 'Table'[Value] )
VAR LastYear =
CALCULATE ( SUM ( 'Table'[Value] ), DATEADD ( 'Date'[Date], -12, MONTH ) )
RETURN
DIVIDE ( CurrentValue - LastYear, LastYear )