Anyway, I have a bit of a complication in this matter.
My "year" dimension have a segments "sub-dimension". Using your guide I'm able to create monthly indexes for all segments.
My problem is that my segments are seasonally affected, so they behavior weirdly within a year period, so I wanted to do indexes based on the YTD calculation (this way my entire base year would be "100", and only in january of the next year it would change, doing monthYTD/basemonthYTD.
If i remove the "TOTAL <Segments>" part of my bottom equation and change the if statement to the base year, All my segments go to 100 to the year 1, but no other years are available.