Forum Discussion

Kpham's avatar
Kpham
Icon for Resolver I rankResolver I
4 years ago
Solved

Page Level Security workaround in Power BI

https://youtu.be/an7n2kSTBk0   I'm trying to implement the Page Level Security Workaround in Power BI from RADACAD, but i'm running into an error:  A table of multiple values was supplied where a ...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Kpham ,

    You can update the measure as below and check if it can work...

    Measure =
    VAR _SalesAV =
    SUM ( 'SD SalesDocumentItems'[Net Value Base Currency] )
    VAR _LookUpSecurity =
    CALCULATE (
    MAX ( 'Page Navigation UPN'[group.member.userPrincipalName] ),
    FILTER (
    'Page Navigation UPN',
    'Page Navigation UPN'[Report ] = "10.001 Order Book"
    )
    )
    RETURN
    IF ( _LookUpSecurity = [User Logged In], _SalesAV )

    And if the table 'Page Navigation UPN' have multiple [group.member.userPrincipalName] values when the value of field [Report ] is  "10.001 Order Book", please update it as below:

    Measure =
    VAR _SalesAV =
    SUM ( 'SD SalesDocumentItems'[Net Value Base Currency] )
    VAR _LookUpSecurity =
    CALCULATETABLE (
    VALUES ( 'Page Navigation UPN'[group.member.userPrincipalName] ),
    FILTER (
    'Page Navigation UPN',
    'Page Navigation UPN'[Report ] = "10.001 Order Book"
    )
    )
    RETURN
    IF ( [User Logged In] IN _LookUpSecurity, _SalesAV )

    If the above one can't help you get the desired result, please provide some sample data in your tables 'SD SalesDocumentItems' and 'Page Navigation UPN' (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

    Best Regards