I have to group on agreement number and get the most recent data for each year. My end goal is to view most recent agreement number for each year so that i don't have repeating agreement number for the year. I am getting error while using SQL for direct query. How can i get this done in Power BI by other method?
consider a column as agreement number with repeating values and date for 5 years.
CodePudding user response:
In power query, you can separate the year from the date field, and group the table by agreement number and year, then return the max result so you can get the most recent date for each year.