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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Week Over Week doesn't work when Filters are used

I have written a Week Over Week Percentage Calculation measure to find the tickets trend. The formula does not work when I add a filter to find out Week Over Week trend for the selected groups.

 

Total Count = DISTINCTCOUNT(incident[number])
New Calculation LW =
VAR CurrentWeek = SELECTEDVALUE( incident[WeekNumber] )
VAR CurrentYear = SELECTEDVALUE( incident[opened_date].[Year] )
VAR MaxWeekNumber = CALCULATE( MAX(incident[WeekNumber] ), ALL(incident) )
RETURN
SUMX(
FILTER( ALL(incident),
IF( CurrentWeek = 1,
incident[WeekNumber] = MaxWeekNumber && incident[opened_date].[Year] = CurrentYear - 1,
incident[WeekNumber] = CurrentWeek - 1 && incident[opened_date].[Year] = CurrentYear ) ),
[Total Count] )
Percentage WOW =
VAR lastWeekAmount =
CALCULATE (
COUNT( incident[number] ),
FILTER (
ALL ( 'incident' ),
'incident'[WeekNumber]
= MIN ( 'incident'[WeekNumber] ) - 1
)
)
RETURN
DIVIDE ( COUNT( incident[number] ) - lastWeekAmount, lastWeekAmount, 0 )

Before Adding the Filter - the percentage is accurate

Before.PNG

 

After Adding a Group as Filter --- Ex Group --- Group1, Group2, Group3

After Adding filterAfter Adding filter

 

After adding the filter the measure New Calculation LW doesn't change and it still shows the values of all the groups.

1 REPLY 1
amitchandak
Super User
Super User

Can you remove all from

ALL(incident)

 

Just make it

incident

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks. 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.