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

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
AFRATH24
Regular Visitor

Filtering Large Datasets from Dynamic CRM to Power BI

Hi Team,

 

I am getting an error when connecting Dynamic CRM to Power BI due to the large data size. so could you please advise to filter the data before importing it to Power BI.

  • When i load data with Direct query source mode it's connecting, i used below query

          Get data ---> Blank query ---> Advanced Editor ---> paste below query
         

 Source = CommonDataService.Database("xxxxxxx.crm6.dynamics.com", [CreateNavigationProperties=false]),
          dbo_opportunity = Source{[Schema="dbo",Item="opportunity"]}[Data]
           in
           dbo_opportunity
  • I need to filter based on 'Estimated Close Date' greater than or equal to January 1, 2022, and filter a few required columns from the CRM, such as Opportunity ID, Owner, Account, Topic, Pipeline, Total Revenue, Opportunity Type, etc. Could someone please provide a filter query and advise me on how to make it easy?

Please provide your feedback; it is greatly appreciated.

 

Thanks,

Afrath

1 ACCEPTED SOLUTION
aduguid
Super User
Super User

I'd try this 

let
    Source = CommonDataService.Database("xxxxxxx.crm6.dynamics.com", [CreateNavigationProperties=false]),
    dbo_opportunity = Source{[Schema="dbo",Item="opportunity"]}[Data],
    FilteredRows = Table.SelectRows(dbo_opportunity, each [EstimatedCloseDate] >= #date(2022, 1, 1)),
    SelectColumns = Table.SelectColumns(FilteredRows, {"OpportunityID", "Owner", "Account", "Topic", "Pipeline", "TotalRevenue", "OpportunityType"}),
    RenamedColumns = Table.RenameColumns(SelectColumns, {"OpportunityID", "Opportunity ID", "Owner", "Account", "Topic", "Pipeline", "TotalRevenue", "OpportunityType"})
in
    RenamedColumns

View solution in original post

1 REPLY 1
aduguid
Super User
Super User

I'd try this 

let
    Source = CommonDataService.Database("xxxxxxx.crm6.dynamics.com", [CreateNavigationProperties=false]),
    dbo_opportunity = Source{[Schema="dbo",Item="opportunity"]}[Data],
    FilteredRows = Table.SelectRows(dbo_opportunity, each [EstimatedCloseDate] >= #date(2022, 1, 1)),
    SelectColumns = Table.SelectColumns(FilteredRows, {"OpportunityID", "Owner", "Account", "Topic", "Pipeline", "TotalRevenue", "OpportunityType"}),
    RenamedColumns = Table.RenameColumns(SelectColumns, {"OpportunityID", "Opportunity ID", "Owner", "Account", "Topic", "Pipeline", "TotalRevenue", "OpportunityType"})
in
    RenamedColumns

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

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.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.