The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
Couldn't get my "Cumulative Mthly Leavers" column to work. Would appreciate your guidance, please.
Thanks!
Vin
Solved! Go to Solution.
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' )
)
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?
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' )
)
// # Leavers TD = count of leavers to date
[# Leavers TD] =
var LastVisibleDate = MAX( 'Calendar'[Date] )
var Output =
CALCULATE(
[# Leavers],
'Calendar'[Date] <= LastVisibleDate,
ALLSELECTED ( 'Calendar' )
)
return
Output
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |