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

Announcements

No record found.

News and Announcements icon
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 903

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

I have the same question (0)
  • Tony zhong Profile Picture
    903 on at

    Hello everyone,

    Appreciate some input on this.

    Thanks in advance.

  • Tony zhong Profile Picture
    903 on at

    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,

  • Suggested answer
    Jolanta Malkowska Profile Picture
    Microsoft Employee on at

    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  

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 689

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 606 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 356

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans