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
KatBous
Frequent Visitor

week % change

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-1669712524036.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,LastWeekCVs0))
 
And this my date table, which I named Calendar.
KatBous_1-1669712523906.png

 

Many thanks!

2 REPLIES 2
v-luwang-msft
Community Support
Community Support

HI  @KatBous ,

Not clear for your first picture ,pls check if the below pbix file is your need. If not ,pls show what your epxected result.And according your data and dax ,it could work ,check the relationship between your table and date type.

 

vluwangmsft_0-1669796674561.png

 

 

Best Regards

Lucien

Thank you for pointing that out! I created new Date Tables as suggested here Solved: Re: Average total calculated by weekly date - Microsoft Power BI Community

 

And problem solved!

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.

Top Solution Authors