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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
soumyaiyer
Frequent Visitor

Calculate change % week on week duration

Hello,

 

Need help to calculate week on week % change with duration as value in power query.

 

Below the matix table with the week number and total duration for each week . 

 

Any help is greatly appreciated! Thanks!

 

Screenshot 2025-06-17 220306.png

1 REPLY 1
speedramps
Community Champion
Community Champion

Click here to donwload the solution form Onedrive

Click here 

 

speedramps_0-1750238935674.png

 

 

Please click thumbs up for me trying to help, because it took a lot of effort.

Then click accept solution if it works. Thank you !

 

How it works ...


The AHT Time has a time data type.
I recommend you convert it to seconds

 

= (Duration.Hours([AHT Time] - #time(0,0,0)) * 60 * 60) +
(Duration.Minutes([AHT Time] - #time(0,0,0)) * 60) +
Duration.Seconds([AHT Time] - #time(0,0,0))

speedramps_1-1750239018535.png

The get the previous row  value

try #"Get AHT seconds" [AHT seconds] { [Week] - 2 } otherwise null

speedramps_2-1750239066427.png

The get the difference

speedramps_3-1750239097484.png

Calculate the persentage

speedramps_4-1750239137529.png

 

 

And change the data type to percentage

speedramps_5-1750239159009.png

 

Please click thumbs up for me trying to help, because it took a lot of effort.

Then click accept solution if it works. Thank you !

 

 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors