Forum Discussion

Gabriel_Pedri's avatar
Gabriel_Pedri
Resolver I
2 years ago
Solved

Filtering through Power BI Measures

I have a date calculated through a measure. I want to use this date to return the value of another measure:   CALCULATED DATE   Date Variation = MAX('Calendar'[Date]) - [PMP]   TOTAL STOCK   ...
  • Gabriel_Pedri's avatar
    Gabriel_Pedri
    2 years ago

    I managed to achieve the final result through this:

     

    Total Stock PMP =
    VAR month = MONTH([Date Variation])
    VAR year = YEAR([Date Variation])

    RETURN
    CALCULATE(
    [Total Stock],
    FILTER (
    ALL('Calendar'),
    'Calendar'[MonthN] = month &&
    'Calendar'[Year] = year
    )
    )

     

    Thank you for your attention.

     

    Best regards!