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

Subtract previous aggregated week value

Hi there, 

 

I am trying to find a measure which calculates the aggregated quantity by week and subtracts it from the overall value.

 

My template is this Excel chart, it basically takes the overall quantity and subtracts the 'Note1 submissions' each given week from the previous week result (note: there are gap weeks with no values)

PBI_w_0-1595839399215.png

 

The column 'Bericht[Geplante Note 1Jahr]' values are weekly Dates in the Format dd.mm.yyyy, therefore there are multiple dates starting at the same Monday of a week.

 

I tried using this measure but returns blank

 

Overdue PPAPs = 
CALCULATE(COUNT(Bericht[Geplante Note 1Jahr]), 
          FILTER(Bericht, Bericht[Note1 Rank] = MAX(Bericht[Note1 Rank]) -1 ))

 

 

Is there a way to rebuild the chart above in PowerBI?

 

3 REPLIES 3
amitchandak
Super User
Super User

Anonymous
Not applicable

Hi @amitchandak ,

tried several approaches with your given links and blog posts but the only thing I get is nothing/blank.

Your formulas just simply sum up the values within one week and print them to the start date (WoW). But this is not what I am looking for, because I don't have values on Tuesday, etc, just on Mondays for the entire week. 

 

Therefore, I am rather looking for a formula which takes each week's WTD (in my case Bericht[Geplante Note1 Date], in picture 'Note 1 submissons')  and subtracts all previous WTDs including the current WTD from the overall value for each given week, as it can be seen in the screenshot bellow.

PBI_w_1-1596016455691.png

 

I do get the overall value minus the current WTD, but not the sum of all previous WTDs for each week (green bars in chart). Do you know a way to get this? 

Hi @Anonymous 

 

Not sure what your data looks like but you can try something like this:

cumulative value =
VAR _date =
    CALCULATE ( MAX ( table[date] ) )
RETURN
    CALCULATE (
        SUM ( table[value] ),
        FILTER ( ALL ( table ), table[date] <= _date )
    )

 

Cheers,
Sturla

If this post helps, then please consider Accepting it as the solution. Kudos are nice too.

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.