Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
OCK
Frequent Visitor

link the time slicer to a measure (calculation)

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.

 

Screenshot 1.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Screenshot 2.jpg

2 REPLIES 2
Anonymous
Not applicable

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

OCK
Frequent Visitor

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors