Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
Could someone please assist me in retrieving the second lookup value instead of the first one? Here are the details:
Table Name: Roles_EmailID
When the user "abcd@gmail.com" logs in, it should return the value "superuser@gmail.com", but it is currently returning "test@gmail.com".
Here is my DAX
VAR _getRoles = IF(CALCULATE (
FIRSTNONBLANK (Roles_EmailID[Email_IDS], 1 ),
FILTER ( ALL ( Roles_EmailID ), Roles_EmailID[RolesEmailid] = USERPRINCIPALNAME())) = "superuser@gmail.com" ,
TRUE(),
[RolesEmailid] = USERPRINCIPALNAME())
RETURN
_getRoles
Solved! Go to Solution.
Hi @Rathod -The rank must correctly differentiate between the different email IDs associated with each RolesEmailid.
create a measure:
Verify that the value returned by USERPRINCIPALNAME() matches exactly with the values in the RolesEmailid column.
Hope this helps
Proud to be a Super User! | |
@Rathod Try with:
if it's ok please accept my answer as solution.
BBF
Hi @Rathod -The rank must correctly differentiate between the different email IDs associated with each RolesEmailid.
create a measure:
Verify that the value returned by USERPRINCIPALNAME() matches exactly with the values in the RolesEmailid column.
Hope this helps
Proud to be a Super User! | |
Hi Rajendra,
Sorry, its working fine. thank you so much
Hi Rajendra,
Thanks for your swift response, i tried with your dax but unfortunatly getting below error
@Rathod , You can try using RANKX for this
VAR _getRoles =
CALCULATE (
FIRSTNONBLANK ( Roles_EmailID[Email_IDS], 1 ),
FILTER (
ADDCOLUMNS (
FILTER ( ALL ( Roles_EmailID ), Roles_EmailID[RolesEmailid] = USERPRINCIPALNAME() ),
"Rank", RANKX ( FILTER ( ALL ( Roles_EmailID ), Roles_EmailID[RolesEmailid] = USERPRINCIPALNAME() ), Roles_EmailID[Email_IDS], , ASC, DENSE )
),
[Rank] = 2
)
)
RETURN
_getRoles
Proud to be a Super User! |
|
Hi Gautam,
Thanks, its working fine
User | Count |
---|---|
14 | |
9 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |