Forum Discussion

LuiSMSR's avatar
LuiSMSR
New Member
3 years ago
Solved

Measure Max Month from recent year + visual to filter data from that max month

Good morning, I am having some difficulties that I don't know how to overcome. I am building a report for accounting. My data has column YEAR and column MONTH. I have a measure called 6. Ano Corr...
  • Anonymous's avatar
    Anonymous
    3 years ago

    For 1st issue, try this
    10. Mes Ultimo =
    var year_max = CALCULATE(MAX(BSHEET[YEAR]))

    return CALCULATE(MAX(BSHEET[MONTH]), FILTER('BSHEET', 'BSHEET'[YEAR]=year_max)
    For 2nd issue, you should try (same period last year) function, that will take the data for same amount of months for previous years too.
    If my reply helps you then do give a thumbs up.