Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
gauravnarchal
Post Prodigy
Post Prodigy

SWITCH TRUE MEASURE

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
0001300103Normal
0001300105Normal
0001300106Normal
0001300107Normal
0001300108FAX

 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

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

View solution in original post

5 REPLIES 5
Samarth_18
Community Champion
Community Champion

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.

Samarth_18_0-1646227919358.png

 

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  - Yes, this is the output result i need.

@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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors