Forum Discussion
Page Level Security workaround in Power BI
- Anonymous4 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
Kpham , Try like
Measure =
var _SalesAV=SUM('SD SalesDocumentItems'[Net Value Base Currency])
var _LookUpSecurity=Maxx(filter('Page Navigation UPN', 'Page Navigation UPN'[Report ],"10.001 Order Book"),'Page Navigation UPN'[group.member.userPrincipalName])
return
if(_LookUpSecurity=[User Logged In],_SalesAV)
Hello, thanks for looking into it but unfortunately not the solution
- Anonymous4 years agoNot applicable
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