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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys, Please help me in getting running sum within a week (ignoring wholesaler). I need output column to get it from below table
| Wholesaler | Week | Qty | Output |
| A | 1 | 10 | 35 |
| B | 1 | 20 | 25 |
| C | 1 | 5 | 5 |
| A | 2 | 20 | 45 |
| B | 2 | 20 | 25 |
| C | 2 | 5 | 5 |
Solved! Go to Solution.
I have understood your needs, you need an Output column to calculate the cumulative data.
I created a table using your data:
Transform data > Add column > Index Column
At this point, there will be a column of serial numbers in multiple places.
Then create a calculated column:
-------------------------------------------------------------------
Output =
SUMX(
FILTER(
'Table',
'Table'[Index] >= EARLIER('Table'[Index]) && 'Table'[Week] = EARLIER('Table'[Week])
),
'Table'[Qty]
)
-------------------------------------------------------------------
This code uses the Filter function to filter from the bottom up, the Week column to set the range, and finally the SUMX function to iteratively aggregate.
The result is as follow:
I have understood your needs, you need an Output column to calculate the cumulative data.
I created a table using your data:
Transform data > Add column > Index Column
At this point, there will be a column of serial numbers in multiple places.
Then create a calculated column:
-------------------------------------------------------------------
Output =
SUMX(
FILTER(
'Table',
'Table'[Index] >= EARLIER('Table'[Index]) && 'Table'[Week] = EARLIER('Table'[Week])
),
'Table'[Qty]
)
-------------------------------------------------------------------
This code uses the Filter function to filter from the bottom up, the Week column to set the range, and finally the SUMX function to iteratively aggregate.
The result is as follow:
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!