Forum Discussion
pilot_butte
3 years agoFrequent Visitor
Calculation referencing previous row, utilizing the value within the same calculated column
Problem: I need to identify the year that a staff member is hired and assign that date to each subsequent year. However, a staff member can be hired, work for several years, leave and then return. W...
- 3 years ago
Hi, pilot_butte ;
You could create a column by dax.
Column = VAR _OUT= CALCULATE(MIN('Table'[School Year]), FILTER(ALL('Table'),[StaffUniqueId]=EARLIER('Table'[StaffUniqueId]) &&[Hired From]="Outside Hire" &&[Hire Year]>=EARLIER('Table'[Hire Year]))) RETURN IF([School Year]>=_OUT&&_OUT<>BLANK(),_OUT-1,CALCULATE(MIN('Table'[Hire Year]),ALLEXCEPT('Table','Table'[StaffUniqueId])))The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
pilot_butte
3 years agoFrequent Visitor
amitchandak stupid question. how do I share data within the forum?
- amitchandak3 years agoSuper User
pilot_butte , If the sample is on excel copy - Paste. Or have a file on one drive or dropbox and share a link.
- pilot_butte3 years agoFrequent Visitor
StaffUniqueId School Year PositionCategory District Retained School Retained Hired From Hire_Source Left To Hire Year 122181 2017 Teacher 1 1 2016 122181 2018 Teacher 1 1 2016 122181 2019 Teacher 1 1 2016 122181 2020 Teacher 1 1 2016 122181 2021 Teacher 1 1 2016 122181 2022 Teacher 2016 1352113 2017 School Other 1 1 2016 1352113 2018 School Other 1 1 2016 1352113 2019 School Other 1 1 2016 1352113 2020 School Other 1 1 2016 1352113 2021 School Other 1 1 2016 1352113 2022 School Other 2016 158445 2017 Special Education 1 0 School 2016 158445 2018 Special Education 1 1 Other School 2016 158445 2019 Special Education 0 0 Central_Districts 2016 158445 2020 0 0 2016 158445 2021 Special Education 1 1 Outside Hire Outside Hire 2020 158445 2022 Special Education 2016 1699202 2017 0 0 2017 1699202 2018 Teacher 1 1 Outside Hire Outside Hire 2017 1699202 2019 Teacher 1 1 2017 1699202 2020 Teacher 1 1 2017 1699202 2021 Teacher 1 1 2017 1699202 2022 Teacher 2017 1714678 2017 School Other 1 1 2016 1714678 2018 School Other 1 1 2016 1714678 2019 School Other 1 1 2016 1714678 2020 School Other 1 1 2016 1714678 2021 School Other 1 1 2016 1714678 2022 School Other 2016 1765221 2017 School Administration 1 1 2018 1765221 2018 School Administration 1 0 School 2018 1765221 2019 School Administration 1 1 Other School Elementary School 2018 1765221 2020 School Administration 1 1 2018 1765221 2021 School Administration 1 1 2018 1765221 2022 School Administration 2018 1850245 2017 Staff Support 0 0 Central_Districts 2016 1850245 2018 0 0 2016 1850245 2019 0 0 2016 1850245 2020 0 0 2016 1850245 2021 0 0 2016 1927760 2017 0 0 2017 1927760 2018 Teacher 1 1 Outside Hire Outside Hire 2017 1927760 2019 Teacher 1 1 2017 1927760 2020 Teacher 0 0 Central_Districts 2017 1927760 2021 0 0 2017 1993224 2017 0 0 2017 1993224 2018 Staff Support 0 0 Outside Hire Outside Hire District_Position 2017 1993224 2019 School Other 1 1 Change Position Paraprofessional (Educational Assistant) 2017 1993224 2020 School Other 0 0 District_Position 2017 1993224 2021 Staff Support 1 1 Change Position Other Non-Licensed Staff 2017 1993224 2022 Staff Support 2017 2043319 2017 0 0 2018 2043319 2018 0 0 2018 2043319 2019 Staff Support 1 1 Outside Hire Outside Hire 2018 2043319 2020 Staff Support 0 0 Central_Districts 2018 2043319 2021 0 0 2018 2043319 2022 Staff Support Outside Hire Outside Hire 2021 2067137 2017 0 0 2018 2067137 2018 0 0 2018 2067137 2019 Student Services 1 1 Outside Hire Outside Hire 2018 2067137 2020 Student Services 0 0 Central_Districts 2018 2067137 2021 0 0 2018 2202220 2017 0 0 2019 2202220 2018 0 0 2019 2202220 2019 0 0 2019 2202220 2020 Student Services 0 0 Outside Hire Outside Hire Central_Districts 2019 2202220 2021 0 0 2019 2381699 2017 0 0 2021 2381699 2018 0 0 2021 2381699 2019 0 0 2021 2381699 2020 0 0 2021 2381699 2021 0 0 2021 2381699 2022 School Other Outside Hire Outside Hire 2021 2438577 2017 0 0 2021 2438577 2018 0 0 2021 2438577 2019 0 0 2021 2438577 2020 0 0 2021 2438577 2021 0 0 2021 2438577 2022 Student Services Outside Hire Outside Hire 2021 266736 2017 School Administration 1 1 2016 266736 2018 School Administration 0 0 Central_Districts 2016 266736 2019 0 0 2016 266736 2020 0 0 2016 266736 2021 0 0 2016 963682 2017 Special Education 1 1 2016 963682 2018 Special Education 1 1 2016 963682 2019 Special Education 1 1 2016 963682 2020 Special Education 1 1 2016 963682 2021 Special Education 1 1 2016 963682 2022 Special Education 2016