Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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])))
User | Count |
---|---|
44 | |
26 | |
21 | |
17 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |