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! Learn more
Hello, I want to create a SWITCH TRUE measure as below
IF TABLE1 CUST NO = TABLE2 CUST NO, (True)TABLE2 PROCESS, (False) MISSING
Tabel 1
| Cust. No. | 
| 0001300103 | 
| 0001300105 | 
| 0001300106 | 
| 0001300107 | 
| 0001300108 | 
| 0001300109 | 
| 0001300110 | 
Table 2
| Cust. No. | PROCESS | 
| 0001300103 | Normal | 
| 0001300105 | Normal | 
| 0001300106 | Normal | 
| 0001300107 | Normal | 
| 0001300108 | FAX | 
Solved! Go to Solution.
Hi @gauravnarchal ,
You can directly create a lookup column in tbl1 like below :-
Column = 
var result = LOOKUPVALUE(_tbl2[PROCESS],_tbl2[Cust. No.],_tbl1[Cust. No.])
return IF(result = BLANK(), "Missing",result)
Or in measure you can use below code:-
Measure = 
var result = CALCULATE(MAX(_tbl2[PROCESS]),FILTER(_tbl2,_tbl2[Cust. No.] = MAX(_tbl1[Cust. No.])))
return IF(result = BLANK(),"Missing",result)
Refer the file below.
Best Regards,
  Samarth
 
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @gauravnarchal ,
You can directly create a lookup column in tbl1 like below :-
Column = 
var result = LOOKUPVALUE(_tbl2[PROCESS],_tbl2[Cust. No.],_tbl1[Cust. No.])
return IF(result = BLANK(), "Missing",result)
Or in measure you can use below code:-
Measure = 
var result = CALCULATE(MAX(_tbl2[PROCESS]),FILTER(_tbl2,_tbl2[Cust. No.] = MAX(_tbl1[Cust. No.])))
return IF(result = BLANK(),"Missing",result)
Refer the file below.
Best Regards,
  Samarth
 
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@Samarth_18 - If the result is true I want to return TABLE2 PROCESS, (False) MISSING
@gauravnarchal is this the expected output you need? if not please share expected output with example.
Best Regards,
  Samarth
 
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
@gauravnarchal , If you see the attached PBIX in above comment, it is returning the same. 🙂
Best Regards,
  Samarth
 
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
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.