Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

One row by firstdate

Hello I am new to power bi and I have some problems with a report. I have a table that looks like this: ------------------------------------1----------------------------------- ID DateBuy Fr...
  • tamerj1's avatar
    4 years ago

    Hi Anonymous 
    Please use this version instead

    Filter Measure = 
    VAR SelectedDate = SELECTEDVALUE ( 'Date'[Date] )
    VAR CurrentDate = CALCULATE ( MAX (Data[DateBuy] ), REMOVEFILTERS ( 'Date' ) )
    VAR NextDate = CALCULATE ( MIN ( Data[DateBuy] ), ALLEXCEPT ( Data, Data[ID] ), Data[DateBuy] >= SelectedDate )
    RETURN
        IF ( CurrentDate = NextDate, 1 )