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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Scott_walter
New Member

Memory consumption issue while refreshing the data source

Hi community,

 

I have a Power BI report that was created using the OData source. I have five tables, the highest contains 30,000 rows currently. I have a requirement to add an index column in the two data tables. Before adding the index column, the two data tables are sorted by three column lets say by ItemId(String), PackingDate(Date) and Status(String) in the Power Query Editor before loading it into Power BI. I am able to perform sorting on these columns and after that I added the index column. So far so good. But when the sources are loaded into the Power BI and data is being refreshed then its throws memory issue although records are very less.

 

What can I do to mitigate this issue?
Thanks
Scott

1 ACCEPTED SOLUTION
cengizhanarslan
Super User
Super User

1) Check query folding at the step right before Sort/Index

In Power Query, right-click the step → View Native Query.

  • If it’s disabled, folding is already broken → sorting/indexing is happening locally.

  • Goal: keep folding up to the point where you filter/reduce rows, then do sort/index.

 

2) Reduce data before sorting/indexing

Apply these as early as possible (while folding still works):

  • Filter rows (date range, status, etc.)

  • Remove unused columns

  • Avoid unnecessary type conversions early

 

3) If you need stable “row number”, do it at the source (best practice)

If you can change the upstream system:

  • Generate row numbers / ordering in the source (SQL/view/service)

  • Expose it via OData as a column
    This avoids Power Query doing expensive sorts.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

View solution in original post

6 REPLIES 6
v-prasare
Community Support
Community Support

Hi @Scott_walter 

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

v-prasare
Community Support
Community Support

Hi @Scott_walter 

We would like to confirm if our community members answer resolves your query or if you need further help. If you still have any questions or need more support, please feel free to let us know. We are happy to help you.

 

@Kedar_Pande, @d_m_LNK , @cengizhanarslan & @FBergamaschi  Thanks for your prompt response

 

 

Thank you for your patience and look forward to hearing from you.
Best Regards,
Prashanth Are
MS Fabric community support

Kedar_Pande
Super User
Super User

@Scott_walter 

 

1. Power Query → Delete Steps: "Sorted Rows" (keep Index only)

2. Index Column → ensure "From 1" (not Table.Buffer)

If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande

d_m_LNK
Super User
Super User

Can you post the code you used to create the index column?

-----------------------
Did this help?
Drop a kudo so others can find it ! 😄
Mark as a solution if it helped you make progress on your issue 😃
cengizhanarslan
Super User
Super User

1) Check query folding at the step right before Sort/Index

In Power Query, right-click the step → View Native Query.

  • If it’s disabled, folding is already broken → sorting/indexing is happening locally.

  • Goal: keep folding up to the point where you filter/reduce rows, then do sort/index.

 

2) Reduce data before sorting/indexing

Apply these as early as possible (while folding still works):

  • Filter rows (date range, status, etc.)

  • Remove unused columns

  • Avoid unnecessary type conversions early

 

3) If you need stable “row number”, do it at the source (best practice)

If you can change the upstream system:

  • Generate row numbers / ordering in the source (SQL/view/service)

  • Expose it via OData as a column
    This avoids Power Query doing expensive sorts.

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.
FBergamaschi
Super User
Super User

Hi @Scott_walter,

the problem can't be the data size.

 

Do you by chance have calculated columns using those columns with index? Those are evaluated during refresh

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 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.