Forum Discussion

tnevarez's avatar
tnevarez
Frequent Visitor
3 years ago
Solved

Help with defining starting row value

Hello!  I am new to the forum and am stuck trying to come up with a formula/measure.  I am needing to index 3 different data sets in order to align them on the same scale instead of graphing with mul...
  • jgeddes's avatar
    3 years ago

    You can create three measures (one for each Item) with the following...

    Item 1 Indexed Value = 
    var _initialValueDate =
    //gets the minimum week end date from the table for the dates that are SELECTED(Filtered)
    MINX(
        ALLSELECTED('Table'),
        'Table'[Week End Date]
    )
    var _initialValue =
    //gets the Item 1 value that coresponds to the intial date calculated
    LOOKUPVALUE(
        'Table'[Item 1],
        'Table'[Week End Date],
        _initialValueDate
    )
    return
    //returns the indexed value using the inital value calculated from the initial date
    ROUND(
        DIVIDE(
            MIN('Table'[Item 1]),
            _initialValue,
            0
        )
        *100,
        0
    )

    You should end up with...