web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

Model Driven App - PowerBI - JSON Filter String

(0) ShareShare
ReportReport
Posted on by 5

Hi All,

I have embedded a PowerBI report onto a form and trying to get it to filter based on the record that is open in the form. I have managed to get the report in the form using the PowerBI control but unable to get it to filter using the static JSON string. I have used the following string:

[{\"$schema\":\"basic\",\"target\":{\"table\":\"tableschemaname\",\"column\":\"column\"},\"operator\":\"In\",\"values\":[$a],\"filterType\":1}]", "Alias": {"$a": "column"}}

The column being used is the record GUID.

Is this the correct way to do it or is my filter in the incorrect format?

Any help would be appreciated.

Dave

I have the same question (0)
  • Leah Ju Profile Picture
    Microsoft Employee on at

    Hi Dave,

    Refer to the following json to check your format:

    https://learn.microsoft.com/en-us/power-apps/maker/model-driven-apps/embed-powerbi-report-in-system-form#embed-with-contextual-filtering 

    Also, checking the following two points:

    1)Table and column need to exactly match the names in Power BI.

    2)The filter alias is the unique name from Dynamics 365 that you filter on.

    In the following example:

    <PowerBIFilter>

    {"Filter":  "[{\"$schema\":\"basic\",\"target\":{\"table\":\"Accounts\",\"column\":\"accountid\"},

    \"operator\":\"In\",\"values\":[$a],\"filterType\":1}]",

    "Alias": {"$a": "accountid"}}

    </PowerBIFilter>

    Power BI has a table called “Accounts”, and a column called “accountid”

    The filter alias is the “accountid” field in Dynamics 365 from the account record that we are on.

    pastedimage1679477755530v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Martin Dráb Profile Picture

Martin Dráb 62 Most Valuable Professional

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Pallavi Phade Profile Picture

Pallavi Phade 49

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans