Forum Discussion
Anonymous
5 years agoNot applicable
What if parameter increased per year
Hi,
Im trying to create a What if parameter for end user to select "attrition rate" for example user would select 5% per year.
Then in my "Line and stacked column chart" i would have x axis as date and y axis as number of employees.
My end goal is then to have a line showing number of employees with 5% loss per year cumulative.
Outcome example
| Year | Employees | What if calculation result |
| 2020 | 1000 | 950 |
| 2021 | 1000 | 900 |
| 2022 | 1000 | 850 |
| 2023 | 950 | 760 |
| 2024 | 950 | 712,5 |
Very thankful for any help!
Anonymous ,
You need to create this measure:
_Accumulate = SUM('Table'[Employees]) - ((RANKX(ALL('Table'[Year]), CALCULATE(MIN('Table'[Year])),, ASC) * Parameter[Parameter Value]) * SUM('Table'[Employees]) / 100)Check the attached file.
2 Replies
- camargos88
Community Champion
Anonymous ,
You need to create this measure:
_Accumulate = SUM('Table'[Employees]) - ((RANKX(ALL('Table'[Year]), CALCULATE(MIN('Table'[Year])),, ASC) * Parameter[Parameter Value]) * SUM('Table'[Employees]) / 100)Check the attached file.
- amitchandak
Super User
Anonymous , Try a measure like
measure = var _min = minx(allselected(Table), Table[Year]) var _sel = selectedvalue(Slicer[slicer]) //what if value return calculate( sum(Table[Employees]) - (((max(Table[Year]) -_min)+1) * _sel * sum(Table[Employees]))/100)