Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
That Worked!!
Thank you heaps
User | Count |
---|---|
134 | |
71 | |
70 | |
54 | |
52 |
User | Count |
---|---|
205 | |
95 | |
63 | |
61 | |
54 |