Forum Discussion

ncreixent's avatar
ncreixent
New Member
8 years ago
Solved

Index 100 Measure with dynamic 100 base date

Hello Everyone!      I'm trying to create a measure that expresses prices as base 100, where the base 100 date is the earliest filtered date on a page level.      The dataset that I have contains...
  • Zubair_Muhammad's avatar
    8 years ago

    HI ncreixent

     

    Try using ALLSELECTED instead of ALL

     

    i.,e. to say

     

    Price_Index =
    VAR Date_index =
        CALCULATE ( MIN ( 'SSD'[DATE] ), ALLSELECTED ( SSD ) )
    RETURN
        ( SUM ( SSD[Val] ) / SUM ( SSD[Vol] ) )
            / (
                CALCULATE ( SUM ( SSD[Val] ), SSD[DATE] = Date_index )
                    / CALCULATE ( SUM ( SSD[Vol] ), SSD[DATE] = Date_index )
            )
            * 100