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
Anonymous
Not applicable

Last 10 Activity

I have data starting 1st Jan 2022 with persons name and date. 

 

I am looking for something similar to last 10 days, but instead of this, I need something that shows the last 10 activity of the person, rather than last 10 days, which only provides data from last 10 days. 

 

Is there any DAX formulas that allow to show last 10 actions?

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You can add a Rank filed using the following DAX: 

Rank = RANKX( ALLEXCEPT('Table', 'Table'[Name]),CALCULATE(MAX('Table'[Date])),, DESC)

Then set a visual level filter to the Rank measure.

veasonfmsft_0-1669786804738.png

Reference:

Top N per group 

Keep top N row for each "category" 

 

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

This provides what I am needing, but this does not appear to take effect on other visuals when a person is selected. 
I would hope to not only see last 10 on table, but also to show 10 on graph, were it apears to be showing everything, assuming because filter is on visual, but does not let me apply to Page or All pages. 

Scotsy_2707_0-1669805958320.png

 

v-easonf-msft
Community Support
Community Support

Hi, @Anonymous 

You can add a Rank filed using the following DAX: 

Rank = RANKX( ALLEXCEPT('Table', 'Table'[Name]),CALCULATE(MAX('Table'[Date])),, DESC)

Then set a visual level filter to the Rank measure.

veasonfmsft_0-1669786804738.png

Reference:

Top N per group 

Keep top N row for each "category" 

 

Best Regards,
Community Support Team _ Eason

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.