Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have two tables and in one of them I would like to create a column "IS" column which returns the value of "ServiceB" if "nameA" exists in "nameB" otherwise it returns the value "T". Can you please help me do this?
TABLE A :
| Date | NomA | ServiceA |
| 2021-09 | toto | yes |
| 2021-09 | dream | no |
| 2021-09 | fire | hurry |
TABLE B :
| Date | NomB | ServiceB |
| 2021-09 | ice | yes |
| 2021-09 | dream | no |
Solved! Go to Solution.
@Anonymous as calculated column
calculatedColumnWithTREATAS =
VAR _a =
CALCULATE (
CALCULATE (
MAXX ( t2, 't2'[ServiceB] ),
TREATAS ( VALUES ( t1[NomA] ), t2[NomB] )
)
)
RETURN
IF ( ISBLANK ( _a ), "T", _a )
as measure
measureWithTREATAS =
VAR _a =
CALCULATE (
MAXX ( t2, 't2'[ServiceB] ),
TREATAS ( VALUES ( t1[NomA] ), t2[NomB] )
)
RETURN
IF ( ISBLANK ( _a ), "T", _a )
@Anonymous as calculated column
calculatedColumnWithTREATAS =
VAR _a =
CALCULATE (
CALCULATE (
MAXX ( t2, 't2'[ServiceB] ),
TREATAS ( VALUES ( t1[NomA] ), t2[NomB] )
)
)
RETURN
IF ( ISBLANK ( _a ), "T", _a )
as measure
measureWithTREATAS =
VAR _a =
CALCULATE (
MAXX ( t2, 't2'[ServiceB] ),
TREATAS ( VALUES ( t1[NomA] ), t2[NomB] )
)
RETURN
IF ( ISBLANK ( _a ), "T", _a )
Hi @Anonymous
Try this:
IS =
Var _A = LOOKUPVALUE('TABLE B'[ServiceB],'TABLE B'[NomB],'TABLE A'[NomA])
return
if(ISBLANK(_A),"T",_A)
output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @Anonymous ,
Try this:
Why are you using the blank() function?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 8 | |
| 8 |