Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculate return with base value/index

Hi,   For a performance dashboard I m trying to create a measure that calculates the return based on a selected period. If I want to calculate the return from 31-01-2021 till 30-04-201 then we hav...
  • tex628's avatar
    tex628
    5 years ago

    Try something along the lines of this:

     

    Measure =
    VAR minDate = MIN(Calendar[Date])
    VAR maxDate = MAX(Calendar[Date])
    PRODUCTX(
    SUMMARIZE( 
    FILTER( ALLSELECTED(Table) , [Date] >= minDate && [Date] <= maxDate ) ,
    [Date] , 
    "Value" ,
    IF( [Date] = minDate , 1 , 1 + [Monthly Return] )
    ) , 
    [Value]
    )

     

    Br,
    J