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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Limiting data pulled from D365 FO into Power BI

I've successfully connected, and can pull entire entities into PowerBI, but given the size of our tables this takes a great deal of time.  I'd like to constrain what is pulled, say the last 7 days of orders created.  I've tried the following (along with a few variations on the syntax), but I still receive the entire table (entity) into Power BI.  

 

Am I stuck with Power BI always pulling the entire entity, then I filter out once ALL the data is within Power BI?  (booo!)

 

let
Source = OData.Feed("https://XXXXX.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderLines_table = Source{[Name="SalesOrderLines",Signature="table"]}[Data],
dbo_ShipDate = SalesOrderLines_table{[Schema="dbo", Item="RequestedShippingDate"]}[Data],
#"Filtered Rows" = Table.SelectRows(dbo_ShipDate, each [RequestedShippingDate] > Date.AddDays(DateTime.LocalNow(), -7))
in
SalesOrderLines_table,

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I think I solved my own problem.  

 

Here's the query that worked.

 

let
Source = OData.Feed("https://xxxxx.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderLines_table = Source{[Name="SalesOrderLines",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(SalesOrderLines_table, each Date.IsInCurrentQuarter([RequestedShippingDate]))
in
#"Filtered Rows"

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I think I solved my own problem.  

 

Here's the query that worked.

 

let
Source = OData.Feed("https://xxxxx.sandbox.operations.dynamics.com/data", null, [Implementation="2.0"]),
SalesOrderLines_table = Source{[Name="SalesOrderLines",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(SalesOrderLines_table, each Date.IsInCurrentQuarter([RequestedShippingDate]))
in
#"Filtered Rows"

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors