Forum Discussion
indexed time series
- 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.
Hi Qiuyun Yu,
Thank you very much for your reply. Unfortunately this cannot be done with filtering data on the visual, it must be set in the DAX function. The first value in the series must be set to 100 while all following items will apply the formula as outline above. Hence it must be something around this:
IF (Table1[Date] = MIN ( Table1[Date] ) ; 100 ; PRODUCT ( Table1[Return] ) * 100
With this filter applied:
FILTER ( ALL ( Table1 ); Table1[Date] <= MAX ( Table1[Date] ) );
VALUES ( Table1[Identifier] )
Thank you,
OCK
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.