cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Scotsy_2707
Frequent Visitor

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, @Scotsy_2707 

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
Scotsy_2707
Frequent Visitor

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, @Scotsy_2707 

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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.