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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
dogt1225
Helper III
Helper III

Fiscal Year Week over Week

I am looking to show the fiscal week over week change. 
The image below show the current data I am getting with my calculations, but there is an error at the start of a new Fiscal Year. The area I've highlighted in yellow should be a 26 (Last week's Submitted Count), but its coming up as zero since week 52 > week 1. Any ideas on what I should change in the "Submitted Previous Week" calculation?

Submitted WOW.PNG

 

 

Submitted Date (Count) = COUNT(Req[Submitted_Date])
Submitted Previous Week = 
     Calculate(Req[Submitted Date (Count)],
        FILTER(ALL('Calendar'),
        'Calendar'[Fiscal Week Num] = SELECTEDVALUE('Calendar'[Fiscal Week Num]) - 1 &&
            'Calendar'[Fiscal Year] = SELECTEDVALUE('Calendar'[Fiscal Year])
        )
     )

 

 

4 REPLIES 4
manikumar34
Solution Sage
Solution Sage

@dogt1225 

Try something like this

Submitted Previous Week = 
     Calculate(Req[Submitted Date (Count)],
        FILTER(ALL('Calendar'),
        if(WEEKNUM(MAX('Calendar'[Date]))=1,
         'Calendar'[Fiscal Week Num] = Calculate(MAX('Calendar'[Fiscal Week Num]),ALL(Calendar)) &&
            'Calendar'[Fiscal Year] = VALUE(MAX('Calendar'[Fiscal Year])-1),
        'Calendar'[Fiscal Week Num] = VALUE(WEEKNUM(('Calendar'[Date)) - 1 )&&
            'Calendar'[Fiscal Year] = VALUE(MAX('Calendar'[Fiscal Year]))
        )
     )
)




If this helps, Appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!


Proud to be a Super User!




amitchandak
Super User
Super User

@dogt1225 , You can create Week Rank (FYYYWW) or on the week start date and use that.

 

New column in date table for FY

Start Year = STARTOFYEAR('Date'[Date],"3/31") //FY end ar 3/31 - change it
WeekDay = WEEKDAY([Date],2) //monday
Start of Week = [Date] -[WeekDay]+1  //monday	
FY Year = YEAR('Date'[Start Year]) // use end year
FY Week = QUOTIENT(DATEDIFF(Minx(FILTER('Date',[FY Year]=EARLIER([FY Year])),'Date'[Start of Week]),[Date],DAY),7)+1

Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)	
OR
Week Rank = RANKX(all('Date'),'Date'[FY Year Week],,ASC,Dense)	//YYYYWW format 

 

 

Try measures like

 

This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))
Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))
Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

 

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

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

@amitchandak Thank you for the response. I am getting the following error when I use RANKX. 

 

"A single value for column 'FY (num) + FW(num)' in table 'Calendar' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result"

 

FY(num) + FW(num) calculation results in fields YYYYMM.

My fiscal calendar is a bit more complex... a fiscal year starts on the fourth Saturday of each calendar year. 

Hi @dogt1225,

Please provide a sample pbix file with some dummy data to test, it should help us clarify your data structures and test to coding formula.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.