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.
PATHCONTAINS(Emp[epath],MAXX(FILTER(Emp,Emp[email] = USERPRINCIPALNAME()),Emp[id]))
above role is not working
id name email manager epath
1 | krishna | krishna@taged.onmicrosoft.com | 1 | |
2 | testuser1 | tester1@taged.onmicrosoft.com | 1 | 1|2 |
3 | testuser2 | tester2@taged.onmicrosoft.com | 2 | 1|2|3 |
4 | testuser3 | tester3@taged.onmicrosoft.com | 2 | 1|2|4 |
5 | testuser4 | tester4@taged.onmicrosoft.com | 2 | 1|2|5 |
id sales
1 | 100 |
2 | 40 |
3 | 50 |
2 | 45 |
4 | 77 |
5 | 23 |
@mgwena @cham @amitchandak @Greg_Deckler @Mariusz
Solved! Go to Solution.
Hi @Truelearner ,
In Manage roles, you can create roles and try this DAX expression to solve your problem:
IF (
CALCULATE (
COUNTROWS ( 'Emp' ),
FILTER ( 'Emp', 'Emp'[email] = USERPRINCIPALNAME () )
) > 0,
[id]
= CALCULATE (
MAX ( 'Emp'[id] ),
FILTER ( 'Emp', 'Emp'[email] = USERPRINCIPALNAME () )
),
[email] = USERPRINCIPALNAME ()
)
When you use View as roles, you will get the following result:
Here is the demo, please try it:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Truelearner ,
In Manage roles, you can create roles and try this DAX expression to solve your problem:
IF (
CALCULATE (
COUNTROWS ( 'Emp' ),
FILTER ( 'Emp', 'Emp'[email] = USERPRINCIPALNAME () )
) > 0,
[id]
= CALCULATE (
MAX ( 'Emp'[id] ),
FILTER ( 'Emp', 'Emp'[email] = USERPRINCIPALNAME () )
),
[email] = USERPRINCIPALNAME ()
)
When you use View as roles, you will get the following result:
Here is the demo, please try it:
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
@Truelearner ,On a Card please check what USERPRINCIPALNAME() is coming. and then check if is matching with email of not
CHECKED ,, I TRIED IN DESKTOP USING USER ROLES AS WELL
I CAN SEND THE FILE IF REQUIRED , CAN YOU TELL ME HOW CAN I ATTACH PBIX HERE I DONT SEE ANY OPTION
ucan download it here
https://drive.google.com/open?id=1OFQ9RsF9ZtxsZVU-JpsYZ1mAXvA-yY_p
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
143 | |
104 | |
103 | |
82 | |
70 |