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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Pandadev
Post Prodigy
Post Prodigy

I have a table that contains 75 million rows of data and the dax formula has out of memory

Hi have this formula in Dax , where I want to get just all the rows of data that has 7 or more days between each delivery

7 Plus Days =
CALCULATE(
max('del_Feed'[del_date_utc]),
FILTER(
'del_Feed',
'del_Feed'[del_id] = EARLIER('del_Feed'[del_id]) &&
'del_Feed'[del_date_utc] < EARLIER('del_Feed'[del_date_utc])
)
)
It works for data up to 3 million rows using dax , but my data table contains 57 million rows , and returns an out of memory error. Is it possible to do this in the query editor please.
4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Pandadev 

Add a Custom Column in Power Query which is the result of one delivery date minus the other.  Then filter out the rows you don't need.

If you give us some idea of what the data looks like (column structure) I can write the code.

Thanks

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


del_date_utc   ,  del_date_time             , del_id     , date diff prev date

31/12/2019       31/12/2019 02:30:00    -19675       0

31/12/2019       31/12/2019 04:30:00    -19675       0

31/12/2019       31/12/2019 06:30:00    -19675       0

30/12/2019       30/12/2019 02:30:00    -19675       2

30/12/2019       30/12/2019 04:30:00    -19675       2

30/12/2019       30/12/2019 06:30:00    -19675       2

28/12/2019       28/12/2019 02:30:00    -19675       10

28/12/2019       28/12/2019 04:30:00    -19675       10

28/12/2019       28/12/2019 06:30:00    -19675       10

18/12/2019       18/12/2019 02:30:00    -19675       1

18/12/2019       18/12/2019 04:30:00    -19675       1

18/12/2019       18/12/2019 06:30:00    -19675       1

17/12/2019       17/12/2019 02:30:00    -19675       1

17/12/2019       17/12/2019 04:30:00    -19675       1

17/12/2019       17/12/2019 06:30:00    -19675       1

31/12/2019       31/12/2019 02:30:00    -10001       0

31/12/2019       31/12/2019 04:30:00    -10001      0

31/12/2019       31/12/2019 06:30:00    --10001      0

30/12/2019       30/12/2019 02:30:00    -10001       8

30/12/2019       30/12/2019 04:30:00    -10001       8

30/12/2019       30/12/2019 06:30:00    -10001       8

22/12/2019       22/12/2019 02:30:00    -10001      14

22/12/2019       22/12/2019 04:30:00    -10001      14

22/12/2019       22/12/2019 06:30:00    -10001      14

08/12/2019       08/12/2019 02:30:00    -19675       1

08/12/2019       08/12/2019 04:30:00    -10001      1

08/12/2019       08/12/2019 06:30:00    -10001      1

07/12/2019       07/12/2019 02:30:00    -10001      1

07/12/2019       07/12/2019 04:30:00    -10001      1

07/12/2019       07/12/2019 06:30:00    -10001       1

 

 

I would like to keep the earliest date time with a date diff of 7 or more  , so from the above , i would like to keep the following rows

28/12/2019       28/12/2019 02:30:00    -19675       10

30/12/2019       30/12/2019 02:30:00    -10001       8

22/12/2019       22/12/2019 02:30:00    -10001      14

Fowmy
Super User
Super User

@Pandadev 

Can you try this measure?

7 Plus Days =

CALCULATE(
    max('del_Feed'[del_date_utc]),
    FILTER(
        SUMMARIZE('del_Feed','del_Feed'[del_id],'del_Feed'[del_date_utc]) 
        'del_Feed'[del_id] = EARLIER('del_Feed'[del_id]) &&
        'del_Feed'[del_date_utc] < EARLIER('del_Feed'[del_date_utc])
    )
)

 

Check your data model for potential performance improvements.

________________________

If my answer was helpful, please click Accept it as the solution to help other members find it useful

Click on the Thumbs-Up icon if you like this reply 🙂


Website YouTube  LinkedIn

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks I tried adding the measure , but get parameter not correct type

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.