Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Make measure including future date

I need to create a measure that calculates the amount of id_avaliacao where the status = "Reprovado" taking into account 5 days after the page filter. Example: filter data_conclusao 2023-01-01 to 20...
  • tamerj1's avatar
    3 years ago

    Hi Anonymous 

    Please try

    Measur =
    VAR CurrentDate =
    MAX ( 'Table'[data_conclusao] )
    RETURN
    COUNTROWS (
    FILTER (
    ALL ( 'Table' ),
    'Table'[Status] = "Reprovado"
    && 'Table'[data_conclusao] > CurrentDate
    && 'Table'[data_conclusao] <= CurrentDate + 5
    )
    )

  • tamerj1's avatar
    tamerj1
    3 years ago

    Anonymous 

    Please try

    Measure =
    VAR MinDate =
    MIN ( 'Table'[data_conclusao] )
    VAR MaxDate =
    MAX ( 'Table'[data_conclusao] )
    RETURN
    COUNTROWS (
    FILTER (
    ALL ( 'Table' ),
    'Table'[Status] = "Reprovado"
    && 'Table'[data_conclusao] > MinDate
    && 'Table'[data_conclusao] <= MaxDate + 4
    )
    )