Forum Discussion
Measure Max Month from recent year + visual to filter data from that max month
- Anonymous3 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.
https://learn.microsoft.com/en-us/dax/sameperiodlastyear-function-dax
Do check out above refrenced link to better understand that function.
Thank you very much for your help Anonymous.
After some research, I'm still not able to replicate the desired result.
Since last month of 2022 is month 10 (as it shows at the card at the top, using the DAX formula you provided), I want that columns before 2022 (in this case only 2021) presents the balance from month 1 to month 10 (the result of the measure [10. Mes Ultimo]) for those years.
Because the way it is now I am watching data until month 10 in 2022 and month 12 in 2021, so the data is not comparable.
Using manual filter I can do it, just drag column Month and filter what's before month 10, but I would have to do it everytime new data comes in and I want that to be automatic.
Thank you in advance for the help provided.