Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Dynamic Row Level Security Equation not working with Date Filter

I have created a hierarchy row level security role in power bi desktop which works as long as there is not date filter on the report. I am trying to create a human resources report that will show the number of resources we have in the company and show their managers who are their direct reports. The HR department wants to see this on a monthly basis and wants to send it out to managers but only allow them to see their hierarchy in the company. The equation works, but not when I have the date filter. I have some test data and the equation below. Any help with this would be greatly appreciated.

IDNameDateEmailManagerIDUserIDMgrID
1Mary1/1/2019Mary@test.com 143466143466
2Matthew1/1/2019Matthew@test.com 243466243466
3David1/1/2019David@test.com1343466143466
4Mark1/1/2019Mark@test.com2443466243466
5Amy1/1/2019Amy@test.com1543466143466
6Bill1/1/2019Bill@test.com4643466443466
7Justin1/1/2019Justin@test.com2743466243466
8Lindsay1/1/2019Lindsay@test.com5843466543466
1Mary2/1/2019Mary@test.com 143497143497
2Matthew2/1/2019Matthew@test.com 243497243497
3David2/1/2019David@test.com1343497143497
4Mark2/1/2019Mark@test.com2443497243497
5Amy2/1/2019Amy@test.com1543497143497
6Bill2/1/2019Bill@test.com4643497443497
7Justin2/1/2019Justin@test.com3743497343497
8Lindsay2/1/2019Lindsay@test.com5843497543497
1Mary3/1/2019Mary@test.com 143525143525
2Matthew3/1/2019Matthew@test.com 243525243525
3David3/1/2019David@test.com1343525143525
4Mark3/1/2019Mark@test.com2443525243525
5Amy3/1/2019Amy@test.com1543525143525
6Bill3/1/2019Bill@test.com4643525443525
7Justin3/1/2019Justin@test.com3743525343525
8Lindsay3/1/2019Lindsay@test.com7843525743525

 

The equation I am using:

PATHCONTAINS(Sheet1[Path],
MaxX(
Filter(
Sheet1,
[Email]=USERPRINCIPALNAME()
)
,Sheet1[UserID]
)
)

1 REPLY 1
Cmcmahan
Resident Rockstar
Resident Rockstar

I'm assuming [Path] is a measure or calculated column you've created to give you a path string of the hierarchy?  Could you share that expression with us?

As it stands, I'm curious: does it work when the date filter is set to the most recent date?  

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.