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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.