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
Hi,
I want to create a DAX that can count the total of items and sum it by the previous month. As an example,
ItemID | ReceiveDate |
A1 | 01/01/2020 |
A2 | 01/02/2020 |
A1 | 01/02/2020 |
B3 | 01/03/2020 |
Count of items and sum it by prev month,, (Jan, Jan+Feb, Jan+Mar,etc.) without creating a new table. I just need the CumulativeItemsCount field. ItemsCount is just a sample.
ReceiveDateMonth | ItemsCount | CumulativeItemsCount |
Jan | 1 | 1 |
Feb | 2 | 3 |
Mar | 1 | 4 |
Do I need to create a column that has the rank of the items filtered by the year and month before proceed with the CumulativeItemsCount column?
Solved! Go to Solution.
@Anonymous , Create count measure
Count Item = count(Table[ItemID])
or
Count Item = distinctcount(Table[ItemID])
Then create a cumulative like
CumulativeItemsCount = calculate([Count Item], filter(allselected(Table]), Table[Date] <= Max(Table[Date])))
@Anonymous , Create count measure
Count Item = count(Table[ItemID])
or
Count Item = distinctcount(Table[ItemID])
Then create a cumulative like
CumulativeItemsCount = calculate([Count Item], filter(allselected(Table]), Table[Date] <= Max(Table[Date])))
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 |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |