Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

2 what-if parameter connected using generateseries

Hello all, I am trying to connect two parameters to each other.  The first one is called "Day" as it contains day range from 1 to 31. The second one is called "Index" and should be connected to th...
  • tamerj1's avatar
    4 years ago

    Hi Anonymous 
    Another way of doing that is as follows https://we.tl/t-rEUCEmyA59

    Index = 
    GENERATE (
        Parameter,
        VAR CurrntValue = Parameter[Parameter]
        VAR DayOfToday = DAY ( TODAY ( ) )
        VAR IndexStart = IF ( CurrntValue <= DayOfToday, -13, -12 )
        VAR IndexEnd = IF ( CurrntValue <= DayOfToday, -2, -1 )
        RETURN 
            GENERATESERIES ( IndexStart, IndexEnd, 1 )
    )