Forum Discussion

ShivGC's avatar
ShivGC
Helper I
3 years ago
Solved

Growth Rate Function using Productx (Dynamic)

Hi,    I am trying to get a DAX measure that is able to look at the earliest SELECTED year, set that year to 100, and then continue to calculate the growth rate from that year onwards.  For inst...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi ShivGC 

    Do you mean if you select 2010-2015, then the value of 2010 should be set as 100, then accumulate it to 2015? If you want to achieve this, you can refer to the following measure

    Measure = var a=MINX(ALLSELECTED(Table1),[Year])
    var b=MAXX(ALLSELECTED(Table1),[Year])
    return IF(SELECTEDVALUE(Table1[Year])=a,100,100*PRODUCTX(FILTER(ALLSELECTED(Table1),[Year]<=SELECTEDVALUE(Table1[Year])&&[Year]>a),[Growth(%)]/100+1)
    )

    Output

     

    Best Regards!

    Yolo Zhu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.