Forum Discussion
Using the Dynamics Business Central Connector, how can I add date filters?
- 4 years ago
I figured it out.
The Business Central connector using the Power BI Odata connector, and the authorizaton is built in.
So the doucumentation I was looking for is the in the Odata connector.
The Odata Connector is well designed and folds and filters back to the Odata source.
So the solution to my problem was dead simple, just add a filter to the query and you get the period you want.
Here's a sample of the M code.
It was all created using the GUI, no advaced editor required.
Chose the income statements table, then add a date filter with the date you want the data for.
let
Source = Dynamics365BusinessCentral.ApiContents(null, null, null),
PRODUCTION = Source{[Name="PRODUCTION"]}[Data],
#"DC Hospitality Apex LLC" = PRODUCTION{[Name="Test Company 1"]}[Data],
v2.0 = #" Test Company 1"{[Name="v2.0"]}[Data],
incomeStatements_table = v2.0{[Name="incomeStatements",Signature="table"]}[Data],
#"Filtered Rows" = Table.SelectRows(incomeStatements_table, each [dateFilter] = #date(2022, 1, 31))
in
#"Filtered Rows"
Hi, dmacdonald
Here are some references that may be helpful:
Power BI with Dynamics 365 Business Central
Dynamics 365 Business Central - How to Connect Dynamics 365 Business Central to Microsoft Power BI
How to create and embed a Power BI report into Dynamics 365 Business Central
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.