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
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 |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
24 | |
19 | |
14 | |
10 | |
7 |