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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Don_P
Frequent Visitor

DAX to calculate rolling percentage of change

I have created a DAX measure that shows me a rolling total over time:

Service Hours =
SUMX(VALUES(D365),
    CALCULATE(
   SUM(D365[Hours]),
    DATESYTD('Date'[Date])
    )
)
 
Here is how it looks:
Don_P_0-1690392160526.png

 

I would like to add a new column that shows the percentage of change between years over time and I have not been able to figure this out.

 

Any help is greatly appreciated.

Thank you

Don Price

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Don_P ,

You can refer the following links to get it:

Calculating Percentage Change in Power BI - A Guide - Monocroft [0492-9f27-475-7563]

YTD Sales = TOTALYTD(SUM(Sales[Amount]), 'Calendar'[Date])

YTD % Change =
DIVIDE (
    [YTD Sales]
        - CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) ),
    CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) )
)

Power BI Year-Over-Year Growth % Calculations [DAX] - YouTube

 

If the above one can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Don_P
Frequent Visitor

Thank you, everyone,

I believe I have found a different way to achieve this.

 

I first created a measure to show me this year's number in this manner: Service Hours = CALCULATE(SUM(D365[Hours]),FILTER('Date','Date'[Date]))

I then created a measure to show me the previous year's number: Previous Year Service Hours = CALCULATE(SUM(D365[Hours]),SAMEPERIODLASTYEAR('Date'[Date]))

I then created a measure like this to calculate the percentage of change: Service Hours % of Change = IF(([Service Hours]/[Previus Year Service Hours]-1) = -1,BLANK(),IFERROR(([Service Hours]/[Previus Year Service Hours]-1), BLANK()))

Don_P_0-1691149903623.png

 

Anonymous
Not applicable

Hi @Don_P ,

You can refer the following links to get it:

Calculating Percentage Change in Power BI - A Guide - Monocroft [0492-9f27-475-7563]

YTD Sales = TOTALYTD(SUM(Sales[Amount]), 'Calendar'[Date])

YTD % Change =
DIVIDE (
    [YTD Sales]
        - CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) ),
    CALCULATE ( [YTD Sales], DATEADD ( 'Calendar'[Date], -12, MONTH ) )
)

Power BI Year-Over-Year Growth % Calculations [DAX] - YouTube

 

If the above one can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following link to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.