Hello, I am still getting used to Alteryx and could use some help in creating a field called FY. Basically a FY is calculated as:
((Summer B (yr), Fall (yr), Spring (yr +1), Summer A (yr+1))
Any help would be appreciated or even pointed into the right direction.
Current:
Year | Season | Code |
2018 | Summer | A |
2018 | Fall | B |
2019 | Spring | A |
2019 | Summer | B |
2019 | Fall | A |
2020 | Spring | A |
2020 | Summer | A |
2020 | Summer | B |
Expected:
Year | Season | Code | FY |
2018 | Summer | A | FY17 |
2018 | Fall | B | FY18 |
2019 | Spring | A | FY18 |
2019 | Summer | B | FY19 |
2019 | Fall | A | FY19 |
2020 | Spring | A | FY19 |
2020 | Summer | A | FY19 |
2020 | Summer | B | FY20 |
Solved! Go to Solution.
Hi @ghtill , this formula should get you what you need. Make sure the year is an integer first.
if [Code]="B" or [Season] = "Fall" then "FY"+ right(tostring([Year]),2)
elseif [Code]="A" or [Season] = "Summer" then "FY"+
right(tostring([Year]-1),2) else "N/A" endif
thanks! @michelle_mathews I only had to add an additional "or" to the elseif statement of [season] = spring incase spring was not a code A