Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Year Over Year percentage for Monthly Data

Hello, 

I am trying to calculate YoY % Change for 3 data points: Revenue, Spend, ROAS (Measure) and display in a table.

 

The current chart is below. I would like to add Revenue YoY % Change, Spend YoY % Change, ROAS YoY % Change. 

Attempted using the solution here - https://community.powerbi.com/t5/Desktop/Year-over-Year-calculation/m-p/75403/highlight/true#M31393. However, I believe that failed because this data set is not continuous but by month? 

 

Any help is appreciated!

Thanks!

 

Data Source: 

datasource.JPG

 

Current Chart: 

Currentchart.JPG

3 REPLIES 3
Anonymous
Not applicable

@Anonymous,

Firstly, create a date table following the instructions in this blog: https://kohera.be/blog/business-intelligence/how-to-create-a-date-table-in-power-bi-in-2-simple-steps/.

Secondly, create relationship using StartMonth field and Date field between two tables.

Thirdly, create the following measures in  your current table.

SumRevenue = SUM(Table2[Revenue])
LastYearRevenue = CALCULATE([SumRevenue],DATEADD('Date'[Date],-1,YEAR))
YOYRevenue = ([SumRevenue]-[LastYearRevenue])/[LastYearRevenue]
SumSpend = SUM(Table2[Spend])
LastYearSpend = CALCULATE([SumSpend],DATEADD('Date'[Date],-1,YEAR))
YOYSpend = ([SumSpend]-[LastYearSpend])/[LastYearSpend]

In addition, we need to know the DAX formula you use to create ROAS.

Regards,

Anonymous
Not applicable

@Anonymous

 

Hello, 

 

Thanks for the response.

I created the Date Table per instructions in the link you provided. Used this formula: 

Date =
ADDCOLUMNS (
CALENDAR(DATE(2000,1,1), DATE(2025,12,31)),
"DateAsInteger", FORMAT([Date], "YYYYMMDD"),
"Year", YEAR ([Date]),
"Monthnumber", FORMAT([Date], "MM"),
"YearMonthnumber", FORMAT([DATE], "YYYY/MM"),
"YearMonthShort", FORMAT([DATE], "YYYY/mmm"),
"MonthNameShort", FORMAT([DATE], "mmm"),
"MonthNameLong", FORMAT ([Date], "mmmm"),
"DayOfWeekNumber", WEEKDAY ([Date],2),
"DayOfWeek", FORMAT ([Date], "dddd"),
"DayOfWeekShort", FORMAT ([Date], "ddd"),
"Quarter", "Q" & FORMAT ([Date], "Q"),
"YearQuarter", FORMAT ([Date], "YYYY") & "/Q" & FORMAT ([Date], "Q"),
"StartOfMonth", FORMAT ([Date], "YYYY/MM/1")
)

 

However, in the YoY Table I need to create a relationship for, the date is First Of Month. Example: 6/1/17, 6/1/17, 5/1/16, etc. 

When I tried to create a relationship between the two tables (YoY and Date) it did not work since it is Many to Many. 

Do you know how I would change the Date table code above to only have the Start of Month? This way the relationship could be Many to One. 

Thanks in advance for your help!

 

Anonymous
Not applicable

@Anonymous,

Would you mind sharing me the PBIX file? In your scenario, as long as you don't have duplicated values in Date field of Date table, you are able to create relationship using First Of Month field and Date field.

Regards,
Lydia Zhang

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.