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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
crodamer
Regular Visitor

Pass multiple Power BI filters from embedded Power BI report in Dynamics CRM

Hi all,

 

I have a POWER BI report that I have embedded on the Project form in Dynamics CRM…

 

Using the xrmtoolbox, I updated the Section that contains the embedding… There are two filters I want to pass to the report… below in bold….

 

<parameters>

          <PowerBIGroupId>fe82918c-f790-48d8-80ec-6cc7e9ba6d07</PowerBIGroupId>

          <PowerBIReportId>16c8944e-9977-44f1-95e2-116eefaf0cb0</PowerBIReportId>

          <TileUrl>https://app.powerbi.com/reportEmbed?reportId=16c8944e-9977-44f1-95e2-116eefaf0cb0</TileUrl>

          <PowerBIFilter>{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project\",\"column\":\"Record Type Id\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1}]", "Alias": {"$a": "wo_recordtype"}}</PowerBIFilter>

          <PowerBIFilter>{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project_embed_filter\",\"column\":\"Project Id Filter\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1}]", "Alias": {"$a": "msdyn_projectid"}}</PowerBIFilter>

</parameters>

 

 

Each parameter works fine if I only include that filter… but when I include both (like above) neither filter works…. I’m guessing that I need to be able to “combine” these two lines into one filter criteria… I’m just not certain how to do this.

 

Do you have any ideas how this might be done?

 

Thanks- Clayce Rodamer

1 ACCEPTED SOLUTION
crodamer
Regular Visitor

Hi all,

 

I figured out the syntax for successfully pass two filters in an embedded Power BI report into Dynamics 365 CE.

The filter that works is:

 

<PowerBIFilter>{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project\",\"column\":\"Record Type Id\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1},{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project_embed_filter\",\"column\":\"Project Id Filter\"},\"operator\":\"In\",\"values\":[$b],\"filterType\":1}]", "Alias": {"$a": "wo_recordtype","$b": "msdyn_projectid"}}</PowerBIFilter>

 

What fixed my original formula as simply using a comma to seperate the filters and then also the Alias portion for the two fields needed to be separated out and following the filter portion.

 

Hope this helps.

 

Clayce

View solution in original post

3 REPLIES 3
crodamer
Regular Visitor

Hi all,

 

I figured out the syntax for successfully pass two filters in an embedded Power BI report into Dynamics 365 CE.

The filter that works is:

 

<PowerBIFilter>{"Filter": "[{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project\",\"column\":\"Record Type Id\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1},{\"$schema\":\"basic\",\"target\":{\"table\":\"vw_fct_project_embed_filter\",\"column\":\"Project Id Filter\"},\"operator\":\"In\",\"values\":[$b],\"filterType\":1}]", "Alias": {"$a": "wo_recordtype","$b": "msdyn_projectid"}}</PowerBIFilter>

 

What fixed my original formula as simply using a comma to seperate the filters and then also the Alias portion for the two fields needed to be separated out and following the filter portion.

 

Hope this helps.

 

Clayce

Anonymous
Not applicable

Hi,

How to use OR condition here? I want to pass two parameters form CRM form. How to use Or condition. So, the report will filter based either of two filters. 

v-henryk-mstf
Community Support
Community Support

Hi @crodamer ,


According to your needs, can check the blog links provided below help you?
Here is the reference link:
Embed filtered Power BI reports on Dynamics 365 forms – again – the official way | crm chart guy

Passing Parameters in URL to Filter a Power BI Report - Carl de Souza


If the problem is still not resolved, let me know immediately. Looking forward to your reply.


Best Regards,
Henry


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.