Forum Discussion
Evita_2023
3 years agoRegular Visitor
Cumulative Turnover Rate Wrong Sequence
Hi, I have 2 tables in Power BI Desktop - Employees & Date Table. I have calculated measure for Turnover Rate saved in Date table. I want to calculate Cumulative Turnover rate for selected perio...
Anonymous
3 years agoNot applicable
Hi Evita_2023 ,
Please try:
Cumulative Turnover Rate 2 =
VAR __lastdate =
MAX ( 'Date'[Date] )
VAR __firstdate =
MIN ( 'Date'[Date] )
VAR __lastdatewithvalue =
CALCULATE ( MAX ( 'Table'[Date] ), REMOVEFILTERS () )
VAR __result =
IF (
__firstdate <= __lastdatewithvalue,
CALCULATE (
CALCULATE (
SUMX ( 'Date', [TurnoverRate] ),
FILTER (
ALL ( 'Date' ),
'Date'[Date] >= MIN ( 'Date'[Date] )
&& 'Date'[Date] <= MAX ( 'Date'[Date] )
)
),
'Date'[Date] <= __lastdatewithvalue,
VALUES ( 'Date'[Date] )
)
)
RETURN
__result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Evita_2023
3 years agoRegular Visitor
Hi Gao,
I hacve tried, but I still get the same result.
In your snapshot of table, you can see that turnover rate doesn't grow by months.
Please see below desired result:
April: 0.93
May: 1.44 (0.93 + 0.51)
June: 2.83 (0.93 + 0.51 + 1.40)
July: 4.02 (0.93 + 0.51 + 1.40 + 1.19)
August: 4.31 (0.93 + 0.51 + 1.40 + 1.19 + 0.30)