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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Row Subtotals for Last Year same Week and for YoY

Hello,

 

I need help to show row subtotals for "same week last Year" and YoY percentage.

Below the screen shot as of now which it is showing as last week value only in total and 100 percent as YoY total.

 

Measure I have used for calculation

Last year same week(option 1) = VAR CurrentYear = MAX ( Dates[Fiscal Year] )
VAR CurrentWeek = MAX ( Dates[WeekNum] )
RETURN
CALCULATE (
[TotalAmount],
ALL ( Dates),
Dates[Fiscal Year] = CurrentYear - 1,
Dates[WeekNum] <= CurrentWeek
)

 

LastYearSameweek(opotion 2) = IF (
ISFILTERED( 'Dates'[Fiscal Year] )
&& ISFILTERED( 'Dates'[WeekNum]), CALCULATE(
SUM ( Data[Order Sum $] ),
FILTER (
ALL ( 'Dates' ),
'Dates'[Fiscal Year]= FORMAT(VALUES ( 'Dates'[Fiscal Year] )-1,"")
&& 'Dates'[WeekNum] =VALUES ( 'Dates'[WeekNum])
&& 'Dates'[Date] <= MAX ( 'Dates'[Date] )
)
))
 
 
YoY = DIVIDE(( TotalAmount-sameweeklastyear),sameweeklastyear],0)
 
Could anyone got this solution, please help.
Thank You

Prevweek.PNG

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @tulasi_pbi1988 ,

Sample file and expected output would help tremendously. Not only providing measures.

Please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hey dude, 

 

This 5 minute video should show you exactly what you need to know - https://www.youtube.com/c/GuyinaCube/videos

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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