Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Anonymous
Not applicable

Displaying only rows with most recent year in table visualization

Hello,

 

I have a table like below:

Name              Year               Dist                Comments
MPR                 2022              3                    Y
MPR                 2023              2                    Y
MPR                 2020              8                    N
NWS                2020              6                     Y

NWS                2019              5                     Y
PER                  2018              7                     Y
PER                                        9                     Y
PER                 2016               4                     N
PER                 2016               1                     Y

I want to have my visualization table to only display the rows with the most recent year for every Name.

My visualization table output as below:

Name              Year               Dist                Comments                      
MPR                 2023              2                    Y
NWS                2020              6                     Y
PER                  2018              7                     Y

Thank you.

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

These measures work

Last year = MAX(Data[Year])
Dist in last year = CALCULATE(MIN(Data[Dist]),FILTER(VALUES(Data[Year]),Data[Year]=MAX(Data[Year])))
Comment in last year = CALCULATE(MIN(Data[Comments]),FILTER(VALUES(Data[Year]),Data[Year]=MAX(Data[Year])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

These measures work

Last year = MAX(Data[Year])
Dist in last year = CALCULATE(MIN(Data[Dist]),FILTER(VALUES(Data[Year]),Data[Year]=MAX(Data[Year])))
Comment in last year = CALCULATE(MIN(Data[Comments]),FILTER(VALUES(Data[Year]),Data[Year]=MAX(Data[Year])))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , refer if my blog on the same topic can help

https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee884e

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors