Forum Discussion
Anonymous
4 years agoNot applicable
DAX expression
Hi, I have data in the following format: I need to find the max of month in each year, the expected output is like this: Year Month max 2019 12 2020 5 ...
- 4 years ago
Hi Anonymous ,
You can create it as a measure like this:
Max Month in Year Measure = CALCULATE( MAX('Date'[Month]),'Date'[Year] = SELECTEDVALUE('Date'[Year]))Or you can create a column like this:
Max Month in Year = CALCULATE( MAX('Date'[Month]), FILTER('Date', 'Date'[Year] = EARLIER('Date'[Year]) ))
Adescrit
4 years agoImpactful Individual
Hi Anonymous ,
You can create it as a measure like this:
Max Month in Year Measure =
CALCULATE( MAX('Date'[Month]),'Date'[Year] = SELECTEDVALUE('Date'[Year]))
Or you can create a column like this:
Max Month in Year =
CALCULATE( MAX('Date'[Month]), FILTER('Date', 'Date'[Year] = EARLIER('Date'[Year]) ))Anonymous
4 years agoNot applicable
Hi Adescrit
Thanks for your solution. Appreciate it.