Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested answer

Power BI default filter for company

(0) ShareShare
ReportReport
Posted on by 897

Hi all,

Regarding default filter for Power BI, I found this link : Help secure analytical workspaces and reports by using Power BI Embedded - Finance & Operations | Dynamics 365 | Microsoft Docs

Which actually question come to mind:

1. At this point -> 

Create a new role against a column in the data model that contains the Company field. Name the new role CompanyFilter. A COMPANY field must be present in the data model to restrict access by company.

Question: Should the role name the exact word "CompanyFilter" ?

2. At this point ->

In the Table filter DAX expression field, enter [COMPANY]=username().

 

Question: the [Company] here is the original field or field name at my current data model ? Since in Power BI we can rename the field, so if later after for example I rename my entity name, lets say I have LegalEntities.company then rename it as LegalEntity.comp.. -> should I go to Role again and change the DAX expression accordingly.

3. And how actually the work or to test it, since I tested with my colleague email id which he doesn't have access to my testing environment which also makes no company he can access, but the report still showing data.

Thanks

  • Suggested answer
    Jolanta Malkowska Profile Picture
    on at
    RE: Power BI default filter for company

    Hi Tony,

    the way it works in the Power BI reports embedded in analytical workspaces is that it is the legal entity (company) that is passed to the report  as "user". If you look at the implementation of the existing embedded reports in Visual Studio you will find code in which this filter is set before the report is requested.

    Best regards,

    Jolanta  

  • Tony zhong Profile Picture
    897 on at
    RE: Power BI default filter for company

    Hello everyone,

    I've come to think, is it true that what actually described in this link  docs.microsoft.com/.../secure-analytical-workspaces

    ..about this code to filter company : [COMPANY]=username(), is actually meant or only work if the report called from PowerBI.com ?

    That kind of filtering or that kind of code is not working for Power BI "internal embed" in F&O Workspace. Internal embed by means not by pin from PowerBI.com, but from AX Resources inside.

    Much appreciated if someone can advice me on this.

    Thanks,

  • Tony zhong Profile Picture
    897 on at
    RE: Power BI default filter for company

    Hello everyone,

    Appreciate some input on this.

    Thanks in advance.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,165 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,964 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Product updates

Dynamics 365 release plans