Forum Discussion

sovereignauto's avatar
sovereignauto
Helper III
5 years ago

M Query loading more data than in model

Afternoon, 

I have the filter below that syncs data from a database but when it is refreshing it refreshes 1.2m records but in the Query Editor it has roughly 50k records

#"Filtered Rows" = Table.SelectRows(dbo_CLAIM, each Date.IsInPreviousNMonths([DateReferred], 6) or Date.IsInCurrentMonth([DateReferred])),

I also notice that on the below line i loose the "view native query" option,

#"Inserted Date" = Table.AddColumn(#"Expanded ACCIDENT", "Date Ref Date", each DateTime.Date([DateReferred]), type date),

Does this mean i sync all records then filter it within PowerBI? 


2 Replies

  • sovereignauto theoretically yes, if the native query is not sent back to the database, it will load in the memory and then filter it, why not add the column in the backend view rather than adding in the PQ

     

    Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

    • sovereignauto's avatar
      sovereignauto
      Helper III

      Makes sense, thank ou for the quick responce is there anyway of replicating the "ADDCOLUMN" line and maintain the Native query?