Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Select one date to filter data between two dates

Hi team, wondering if I can please get some help with this. I have an asset table with DateFrom and DateTo. A new row is created in the database on the following date when there has been a chang...
  • v-eachen-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    You could try the following measure:

    Measure =
    VAR a =
        SELECTEDVALUE ( 'Date'[Date] )
    RETURN
        CALCULATE (
            CALCULATE ( MAX ( 'Table'[Amount] ), ALLEXCEPT ( 'Table', 'Table'[ID] ) ),
            FILTER ( 'Table', 'Table'[DateFrom] <= a && 'Table'[DateTo] >= a )
        )