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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DAX throws out of memory on FILTER with "not equals"

Hello All,

 

I have a single column with 400K rows, which contain random numbers.

The following DAX formula calculates immediately, but the inverse (just negating the equals condition) results in an Out Of Memory Exception (after the calculation runs for several minutes). Can you reproduce it and how to solve it? Thanks.

test_filter_1 = COUNTROWS(
    FILTER(
             table_1,
             table_1[column1] = EARLIER(rable_1[column1])
     )
)

test_filter_1_negated =

COUNTROWS(
           FILTER(
                   table_1,
                   NOT(table_1[column1] = EARLIER(rable_1[column1]))
             )
  )

1 REPLY 1
kentyler
Solution Sage
Solution Sage

I think the root of your problem is that you're using EARLIER to mean "previous row". That's what it sounds like it should do, but the name is deceptive. It really means something like, "in the previous context"

EARLIER

  • 12/09/2018
  • 3 minutes to read
      •  
     
    •  

Returns the current value of the specified column in an outer evaluation pass of the mentioned column.

EARLIER is useful for nested calculations where you want to use a certain value as an input and produce calculations based on that input. In Microsoft Excel, you can do such calculations only within the context of the current row; however, in DAX you can store the value of the input and then make calculation using data from the entire table.

EARLIER is mostly used in the context of calculated columns.

Syntax

DAXCopy
EARLIER(<column>, <number>)  




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.