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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
TB12
New Member

Find user who is in two columns

Hello,

 

I have a table that has columns for groups users should belong to.  They should be mutally exlcusive, but some users belong to both groups by mistake and I'm trying to find who they are.  In the table below, how would I find out that person@gmail.com belongs to both the 'ALL' column and the ' INDIVIDUAL ACCESS' column, both designated by '1's'.  Thanks!

 

USER_PRINCIPAL_NMLOCATION IDALLINDIVIDUAL ACCESS
person@gmail.comXYZ12301
person@gmail.comXYZ12401
person@gmail.comXYZ12501
person@gmail.comALL_ACCESS10
person2@gmail.comABC78901
anotherperson@gmail.comALL_ACCESS10
4 REPLIES 4
ThxAlot
Super User
Super User

ACCESS.pbix

 

Simple enough, just unpivot those 2 flag columns; this is a generic solution.

ThxAlot_0-1683785685435.png

 

ThxAlot_1-1683785725467.png

 



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Ahmedx
Super User
Super User

pls try this

Screen Capture #1097.png

or this

Screen Capture #1098.png

TB12
New Member

That worked!  Thank you!

rsbin
Super User
Super User

@TB12 ,

Here is one potential solution.  I created three additional Calculated Columns as follows:

Flag_ALL = IF( CALCULATE( SUM([ALL]),
                     ALLEXCEPT( UserGroups, UserGroups[USER_PRINCIPAL_NM] )) >= 1,
                     "Yes", "No" )

Flag_Indiv = IF( CALCULATE( SUM([INDIVIDUAL ACCESS]),
                     ALLEXCEPT( UserGroups, UserGroups[USER_PRINCIPAL_NM] )) >=1,
                     "Yes", "No" )
Flag_Both = SWITCH(
                TRUE(),
                AND( [Flag_ALL] = "Yes", [Flag_Indiv] = "Yes"), "Both",
                "" )

You will be able to, at some point, combine these all into 1, but for explanation sake, I felt it best to demonstrate it this way.

USER_PRINCIPAL_NM LOCATION ID ALL INDIVIDUAL ACCESS Flag_ALL Flag_Indiv Flag_Both
person@gmail.com XYZ123 0 1 Yes Yes Both
person@gmail.com XYZ124 0 1 Yes Yes Both
person@gmail.com XYZ125 0 1 Yes Yes Both
person@gmail.com ALL_ACCESS 1 0 Yes Yes Both
person2@gmail.com ABC789 0 1 No Yes  
anotherperson@gmail.com ALL_ACCESS 1 0 Yes No  

Hope you will be able to follow the logic.  Reach out if you need further explanation.

Regards,

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.