Forum Discussion
VinLee1314
3 years agoNew Member
Cumulative monthly count
Hi all, Couldn't get my "Cumulative Mthly Leavers" column to work. Would appreciate your guidance, please. Leavers = CALCULATE( [Count of Employees], USERELATIONSHIP('...
- 3 years ago
Hi VinLee1314
you have to YearMonth number column in your date table. The try the following
Cumulative Mthly Leavers =
CALCULATE (
[Leavers],
'Calendar'[YearMonth] <= MAX ( 'Calendar'[YearMonth] ),
ALLSELECTED ( 'Calendar' )
)
VinLee1314
3 years agoNew Member
I managed to get it working on a monthly basis. I would like the running total to continue after the year ends. How do I make changes to the DAX?
Cumulative Leavers =
CALCULATE
(
[Leavers],
FILTER
(
CALCULATETABLE
(
SUMMARIZE('Calendar', 'Calendar'[Date].[MonthNo], 'Calendar'[Date].[Month]),
ALLSELECTED('Calendar')
),
ISONORAFTER
(
'Calendar'[Date].[MonthNo], MAX('Calendar'[Date].[MonthNo]), DESC,
'Calendar'[Date].[Month], MAX('Calendar'[Date].[Month]), DESC
)
)
)
Thanks!
tamerj1
Community Champion
3 years agoHi VinLee1314
you have to YearMonth number column in your date table. The try the following
Cumulative Mthly Leavers =
CALCULATE (
[Leavers],
'Calendar'[YearMonth] <= MAX ( 'Calendar'[YearMonth] ),
ALLSELECTED ( 'Calendar' )
)
- VinLee13143 years agoNew Member