Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
I want to make something like this:
TABLE:
Field 1
Field 2
Field 3
This table must have a Field 4 which contains Field 1 if the logged in person is in Active Directory Group 'Group A', if he is 'Group B' it must contain Field 2 and otherwise it must contain Field 3.
I have a table in my model which contains this:
UPN IsMemberOfGroupA IsMemberOfGroupB
mailaddress 1 0
.....................
I've tried so many things, but I'm not able to fix this. I get problems with using USERPRINCIPALNAME() in row-context, not unique values and so on.... I'm totally clueless.
Can somebody tell me with which DAX expression in TABLE I can do this?
have you tried the switch statement?
something to the effect off
switch(true(),
and (ismembergroupA = 1, ismembergroupb = 0), "Result",
and (ismembergroupA = 0, ismembergroupb = 1), "Result",
"Other Result")
Proud to be a Super User!
That gives an error that I've already got and what makes clear that I'm not familiar enough with DAX... It gives:
A single value for column 'IsGroupA' in table 'member groups' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
can i see your dax code with an example of the data
Proud to be a Super User!
We've mailed and Vanessas solution is to combine everything in 1 table. A solution that absolute will work, but not what I'm looking for...
I'm afraid I'm looking for something that is not possible....
out of curiosity why does combining the tables not work for you?
Proud to be a Super User!
I think it will work, but it's not what I was hoping for. This gives me 2 'facttables', only for something easy (in other languages/tools) as this:
if (username IN (list of people that are manager) { FieldA } else { FieldB }
So I'm still hoping to solve it another way, that is also easier to understand for other people at a later moment....
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.