Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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])))
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |