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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Steels_Cat
Helper I
Helper I

Week Over Week measure problem

Hello All, 

I have been working on project where i have to find difference between weeks:

Steels_Cat_0-1637602918774.png

I have created this measure but does not calculate properly the difference between those two weeks. 

40 compalience - 41 compalience), first row is correct 100% - 50% = 50%, second also is not correct shoud be - 0% and third is not corect sound be ( 50% - 45.5% = 4.5%) and etc

ComplinaceMoM%Week =
VAR CurrentYearWeekNumber = SELECTEDVALUE ( 'Date'[Week_Number]) (conteins week numbers 1,2,3,4...)
VAR PreviousYearWeekNumber = CurrentYearWeekNumber - 1
VAR Result =
CALCULATE (
[Compliance](this is a measure,
REMOVEFILTERS ( 'Date' ),
'Date'[Week_Number] = PreviousYearWeekNumber
)
RETURN
[Compliance]-Result
----------------------------------------
Compliance = CALCULATE(
DIVIDE( SUM('Table 1'[TargetReached]),
COUNTROWS('Table 1')),
ISBLANK('Table 1'[Measure 1])=FALSE()
)

 

Any ideas, where can be the problem ?

 

 

1 REPLY 1
V-lianl-msft
Community Support
Community Support

Please try :

ComplinaceMoM%Week =
VAR CurrentYearWeekNumber = SELECTEDVALUE ( 'Date'[Week_Number]) (conteins week numbers 1,2,3,4...)
VAR PreviousYearWeekNumber = CurrentYearWeekNumber - 1
VAR Result =
CALCULATE (
[Compliance](this is a measure ) ,
FILTER (ALL ( 'Date' ),
'Date'[Week_Number] = PreviousYearWeekNumber
)
RETURN
[Compliance]-Result

If the problem still exists, could you provide a sample pbix file after removing sensitive data.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors