Join 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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I'm looking to create a new column in my data model that displays different values based on the user[ID]:
If user[ID] >= 50, I want to retrieve the name from the entity table using the formula: LOOKUPVALUE(entity[Name], entity[Entity ID], user[Entity ID])
If user[ID] < 50, I want to retrieve the name from the old_entity table using the formula: LOOKUPVALUE(old_entity[Name], old_entity[Entity ID], user[Entity ID])
I'm not sure how to accomplish this in DAX. Can anyone help with the correct DAX formula for this scenario?
Thank you!
Solved! Go to Solution.
@Kat_00 Seems like:
Column in User Table =
VAR __ID = [ID]
VAR __Result =
SWITCH( TRUE(),
[ID] >= 50, LOOKUPVALUE( entity[Name], entity[Entity ID], __ID ),
LOOKUPVALUE( old_entity[Name], old_entity[Entity ID], __ID )
)
RETURN
__Result
Thank you so much for the help! Your suggestions worked perfectly!
@Kat_00 Seems like:
Column in User Table =
VAR __ID = [ID]
VAR __Result =
SWITCH( TRUE(),
[ID] >= 50, LOOKUPVALUE( entity[Name], entity[Entity ID], __ID ),
LOOKUPVALUE( old_entity[Name], old_entity[Entity ID], __ID )
)
RETURN
__Result
User | Count |
---|---|
15 | |
11 | |
6 | |
6 | |
5 |
User | Count |
---|---|
30 | |
18 | |
11 | |
7 | |
5 |