Forum Discussion

ElliotP's avatar
ElliotP
Post Prodigy
9 years ago
Solved

Easy Measure

Afternoon,   I've got some data which comes in quarterly and I'd like to show the latest value and then a measure to show the value before that assuming it isn't null.   I have my date columns, m...
  • Greg_Deckler's avatar
    9 years ago

    I imagine that there are easier ways to do this, but one way would be to create a calculated table:

     

    TableData1 = CALCULATETABLE(Data,Data[Data1]<>BLANK())

    Then you measure:

     

    Measure Data 1 = CALCULATE(SUM(TableData1[Data1]),FILTER(TableData1,TableData1[Index]=MAX(TableData1[Index])))

    The first part ensures no blanks, the second part filters to the max of the index.

     

    My sample data was this:

     

    Index         Date          Data1   Data2

    13/1/20171020
    23/2/20172030
    33/3/20173040
    43/4/201740 
    53/5/2017 60