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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
timelez
New Member

Last entry in a filtered selection

Hi Everybody, i cant find a solution to a query that i have to do for the report of my company.

 

The data is based on a excel file where some formulas and the date is already entered in advance. my colleagues only enter some values day by day. 

 

I now need to know the last entered value of column that has been filtered by a slicer.

For example this table:

 

If i set the slicer to 2.9.2020 to 4.9.2020 and use LASTNONBLANK the result for Errors Found is 10 which is obviously not correct. So i have read about the Index function but as you can see, the MAX Index is 4 which is also not the correct value.

 

Therefore i need a formula which obeys the Date Slicer and shows the Value "3" which in this example ist the true last value in that table.

 

I cannot delete the additional lines at the end because some of my colleagues might forget to copy the formulas or change them by accident.

 

Thank you in advance.

 

IndexDateErrors FoundErrors FixedWorking Hours
11.9.202022

100

22.9.20201010200
33.9.202032300
44.9.2020   
1 ACCEPTED SOLUTION
v-alq-msft
Community Support
Community Support

Hi, @timelez 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

i1.png

 

You may create a measure as below.

Result = 
CALCULATE(
    MAX('Table'[Index]),
    FILTER(
        ALLSELECTED('Table'),
        NOT(ISBLANK('Table'[Errors Found]))
    )
)

 

Result:

i2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-alq-msft
Community Support
Community Support

Hi, @timelez 

 

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

Table:

i1.png

 

You may create a measure as below.

Result = 
CALCULATE(
    MAX('Table'[Index]),
    FILTER(
        ALLSELECTED('Table'),
        NOT(ISBLANK('Table'[Errors Found]))
    )
)

 

Result:

i2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@timelez - If I am reading this correctly:

Measure = MAXX(FILTER('Table',NOT(ISBLANK([Errors Found]))),[Index])


Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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
Top Kudoed Authors