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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
carlosDash
Advocate V
Advocate V

How can I show the five latest entries in my report table? (Top 5)

I have a data table with columns for "City" and "DateAdded". The "City" column is just the name of the entry (Ohio, New York, Chicago etc.) and the "DateAdded" is a date (2017-01-09 09:06:34.863, 2016-03-16 16:00:29.000 etc.). 

 

I'm trying to build a report table where I can list five of the newest entries to display. I tried using the "DateAdded" column as a filter with the "Top N" filter type with the value "Top - 5" but it actually displays six values instead of five. This is because the last two "DateAdded" entries have identical values (both are '2016-01-17 00:00:00.000').
 

 

How could I limit my table to exactly five values? 

3 REPLIES 3
v-caliao-msft
Employee
Employee

Hi @carlosDash,

 

As you said
the last two "DateAdded" entries have identical values (both are '2016-01-17 00:00:00.000')

So for the last tow entries, which one would like to show in your table?

 

This function return the row that rank value =1, 2, 3, 4 and 5. Then rank value for the last two entires=5, so both of them will be show in your table.

 

Regards,

Charlie Liao

Hmm, that's a really good question and right now I can't think of another parameter to filter with. The only thing that comes to mind is maybe showing the entry which comes 'first' in the alphabet, but that's not really a proper rule to filter with and I don't know if that's even possible to begin with.

Greg_Deckler
Super User
Super User

Sounds like you need to investigate the RANKX DAX function.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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