Forum Discussion

leandroduarte's avatar
5 years ago
Solved

Create a Calculate index per year

Dear All, I'm looking for a dax formula to create a calculate index for each year as per table below:   basically it would take the first item (A) and divide by the value *100 per year.   Year...
  • v-xicai's avatar
    5 years ago

    Hi leandroduarte ,

     

    You may create measure like DAX below.

     

    Index Year =
    VAR ValueA =
        CALCULATE (
            MAX ( Table1[Values] ),
            FILTER (
                ALLSELECTED ( Table1 ),
                Table1[Year] = MAX ( Table1[Year] )
                    && Table1[Item] = "A"
            )
        )
    VAR Current =
        MAX ( Table1[Values] )
    RETURN
        DIVIDE ( ValueA * 100, Current )
    

    Best Regards,

    Amy 

     

    Community Support Team _ Amy

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.