Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi All,
I'd like to have the time slicer dynamically recalculate a measure from the selected start date. The measure creates an indexed time series of percentage returns rebased to 100 at the starting point. This is the measure that I use:
FundReturnTmp =
CALCULATE (
IF ( COUNTROWS ( Global_AssetType ) = 1 ; 100 ; PRODUCT ( Global_AssetType[FundReturn] ) * 100 ) ;
FILTER ( ALL ( Global_AssetType ); Global_AssetType[Date] <= MAX ( Global_AssetType[Date] ) ) ;
VALUES ( Global_AssetType[OrderKey] )
)
Below two screenshots of the chart. The first is with the time slicer set at the starting point of the data and the second is with the time slicer set somewhere in the middle of the series. Aim is to have the second chart dynamically rebased to 100 at the new starting point. Thank you very much for any help.
Hi @OCK,
You can try to use below measure if it works on your side:
FundReturnTmp =
CALCULATE (
IF ( MAX([Date].[Year])=MINX(ALLSELECTED(Global_AssetType);[Date].[Year]);100 ; PRODUCT ( Global_AssetType[FundReturn] ) * 100 ) ;
FILTER ( ALL ( Global_AssetType ); Global_AssetType[Date] <= MAX ( Global_AssetType[Date] ) ) ;
VALUES ( Global_AssetType[OrderKey] )
)
Regards,
Xiaoxin Sheng
Hi Xiaoxin
Thank you very much for your reply. The measure does correctly filter on the time axes (as it did before), however, it does not rebalance the new starting point of the line graphs to 100. It still only takes all values of the data since original start but just displays it in a time window (as before).
Maybe it is a nested if function with your suggestion and with countrows. On point: your suggested formula is rather slow in performance (about 10 sec to rebuild the chart)
Thank you again
Otto