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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hey all,
Is it possible to add up previous numbers in a column if they are at an earlier date by item code.
For example,
| Item Code | date | Quantity | New Column |
| a | 01/01/23 | 10 | 10 |
| a | 03/01/23 | 15 | 25 |
| a | 06/01/23 | 5 | 30 |
| a | 11/01/23 | 20 | 50 |
| b | 05/01/23 | 30 | 30 |
| b | 15/01/23 | 25 | 55 |
Hope this makes sense. Let me know if you need anymore information.
Thanks
Nathan
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Expected result CC =
SUMX (
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE ( Data, Data[Item Code], Data[date], Data[Quantity] ),
ORDERBY ( Data[date], ASC ),
KEEP,
PARTITIONBY ( Data[Item Code] )
),
Data[Quantity]
)
Hi,
Please check the below picture and the attached pbix file.
It is for creating a new column.
Expected result CC =
SUMX (
WINDOW (
1,
ABS,
0,
REL,
SUMMARIZE ( Data, Data[Item Code], Data[date], Data[Quantity] ),
ORDERBY ( Data[date], ASC ),
KEEP,
PARTITIONBY ( Data[Item Code] )
),
Data[Quantity]
)
That Worked!!
Thank you heaps
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 123 | |
| 99 | |
| 67 | |
| 49 |