Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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])))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
26 | |
19 | |
14 | |
10 |
User | Count |
---|---|
57 | |
49 | |
44 | |
18 | |
18 |