Forum Discussion

OCK's avatar
OCK
Frequent Visitor
9 years ago
Solved

indexed time series

Hi All   I'm a complete newbie to DAX, while much more experienced with VBA and MySQL. I'm working with percentage growth time series data, sequentially stored in a table by Identifier, Date and Re...
  • OCK's avatar
    OCK
    9 years ago

    Anybody who's interested, here's the solution after a few hours of try and error:

     

    ReturnTmp =
    CALCULATE (  
               IF ( COUNTROWS ( Table1 ) = 1  ;  100  ;  PRODUCT ( Table1 [Return]  ) * 100  ) ;
               FILTER ( ALL ( Table1 ) ;  Table1[Date] <= MAX (Table1[Date]  )  )  ;
               VALUES ( Table1[Identifier] )
    )

     

    This is a rather standard chart in financial analysis for plotting return series.