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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Week over Week % Change

 

I'm tracking how many emails we send out every week. I want to display the change WoW as a percentage. I have tried to use the measure from the post here: Week over Week Change. But it only returns the nonsense you see in the screenshot. 

 

There will be weeks when we did not send any emails. Between weeks 4-6 for example. Not sure if this will affect the measure in any way.

 

powerbi.JPG

 

Measure = 
VAR lastWeekAmount =
    CALCULATE (
        SUM ( 'Email Data'[Emails sent] ),
        FILTER (
            ALL ( 'Email Data' ),
            'Email data'[Week]
                = MIN ( 'Email Data'[Week] ) - 1
        )
    )
RETURN
    DIVIDE ( SUM( 'Email data'[Emails sent] ) - lastWeekAmount, lastWeekAmount, 0 )

 

Thank you

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, 

I created a table with similar data and copied the measure from your post, it works fine.

email data.PNG

email2.PNG
If you specify how your data is different from the table I created maybe we can find the issue

**I did change the 'Return' part to:

RETURN
IF (lastWeekAmount=0,"N/A",
DIVIDE ( SUM( 'Email data'[Emails sent] ) - lastWeekAmount, lastWeekAmount, 0 )
)

so that weeks that come after a week with no sales, return "N/A".

View solution in original post

2 REPLIES 2
KatBous
Frequent Visitor

Hi to everyone,

 

I tried to use this solution in my data but I have two issues.

 

1) I cannot get the LastWeekSum result to be presented at week level. Instead it repeats itself for eveyday of the week.

KatBous_0-1669025404333.png

2) although last week sum is correct, the weekly % change is not.

 

These are my data.

 

DateBranchCVsCVs weekly change
30/09/2022a55
30/09/2022b77
30/09/2022c33
30/09/2022d1010
30/09/2022e 0
14/10/2022a1712
14/10/2022b2215
14/10/2022c96
14/10/2022d2010
14/10/2022e11
28/10/2022a3518
28/10/2022b3311
28/10/2022c145
28/10/2022d3010
28/10/2022e32

 

This is the formula: 

Measure =
VAR LastWeekCVs =
        CALCULATE (
        SUM ( FW_Appended[CVs weekly change] ),
        FILTER (
            ALL ( 'CALENDAR' ),
            'CALENDAR'[week]
                = MIN ('CALENDAR'[week] ) -1))
RETURN
   IF (LastWeekCVs=0,"N/A",
      DIVIDE ( sum (FW_Appended[CVs weekly change]) - LastWeekCVs,LastWeekCVs, 0))
 
And this my date table, which I named Calendar.
KatBous_1-1669025728908.png

 

Many thanks!

Anonymous
Not applicable

Hi, 

I created a table with similar data and copied the measure from your post, it works fine.

email data.PNG

email2.PNG
If you specify how your data is different from the table I created maybe we can find the issue

**I did change the 'Return' part to:

RETURN
IF (lastWeekAmount=0,"N/A",
DIVIDE ( SUM( 'Email data'[Emails sent] ) - lastWeekAmount, lastWeekAmount, 0 )
)

so that weeks that come after a week with no sales, return "N/A".

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.