March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |