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 OCK,
If I understand you correctly, you want to show the first point for all series which are around 100 in the line chart, right?
If that is a case, assume in 2004 year, all series data point are around 100. Then you can drag the X-axis field into the Visual level filter, set the "is greater than or equal to" 2004.
But if in 2004 year, only 1 series data point around 100, while other series's data point are around 100 in 2008 year. In this scenario, we can't move those series to the left side of the chart, to display on 2004 year. As in the chart, X-axis and Legend are groups, the position data points values display is based on the intersection of the X-axis and Legend.
Best Regards,
Qiuyun Yu
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
- OCK9 years agoFrequent Visitor
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.