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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Johnce1607
Frequent Visitor

% increase of Year to Date on the Same Year to date 1 calendar week ago

Good Evening, 

 

Im looking to create a % increase in Week on Week performance, But the weeks must be a running total of the year to date

See below, I would need in W7 to get a % increase from W6 to W7. Below shows a basic 

= TOTALYTD(SUM(Booking[Total Price]),CalendarBooked[Date])

Johnce1607_0-1679604050510.png

 

Many thanks for your help in advance

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

Assuming Week numbers on the X-axis have been dragged from the Calendar table and there is a relationship (Many to One and Single) from the Date column Booking table to the Date column of the Calendar Table, write these measures:

TP = SUM(Booking[Total Price])

TP YTD = calculate([tp],datesytd(calendar[date],"31/12"))

TP YTD till last week = calculate([tp tyd],datesbetween(calendar[date],min(calendar[date])-7,min(calendar[date])-1))

Growth (%) = divide(([TP YTD]-[TP YTD till last week]),[TP YTD till last week])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Perfect, thank you. Only thing it doesnt do is exlucde the calc on the first week of the year, so brings in the full year from before, Is there a way to exlclude this?

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Assuming Week numbers on the X-axis have been dragged from the Calendar table and there is a relationship (Many to One and Single) from the Date column Booking table to the Date column of the Calendar Table, write these measures:

TP = SUM(Booking[Total Price])

TP YTD = calculate([tp],datesytd(calendar[date],"31/12"))

TP YTD till last week = calculate([tp tyd],datesbetween(calendar[date],min(calendar[date])-7,min(calendar[date])-1))

Growth (%) = divide(([TP YTD]-[TP YTD till last week]),[TP YTD till last week])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Perfect, thank you. Only thing it doesnt do is exlucde the calc on the first week of the year, so brings in the full year from before, Is there a way to exlclude this?

You are welcome.  Does this measure work?

TP YTD till last week = if(Calendar[Week]="W1",blank(),calculate([tp tyd],datesbetween(calendar[date],min(calendar[date])-7,min(calendar[date])-1)))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Johnce1607 , Try like

TOTALYTD(SUM(Booking[Total Price]),dateadd(CalendarBooked[Date],-7, Day))

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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