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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

How to use Lookup function for two conditions

I have two Table confimation and PValues. both sheet 

My Pvalues table  Sample data below .

 

My Pvalues  Table 

 

Plant      PlantIdvalue               

CH01        P55                             

CH12        P55                             

CH41        P55                             

DE07        P52

PT01        P57

 

 

CONFIRMATION  TABLE 

I am trying to bring  plant value based on the Pvalue table compre  with  Plant.  i have used dax lookup up fucntion   but  if any value in Text  format  category column in confirmation table   plant value should be CT. 

 

P.ID Code = IF( LOOKUPVALUE(PValuesID[Pallet ID Value],PValuesID[Plant],FInal[Plant]),OR(FILTER(FInal,FInal[cat]="AA"),"CT"))
 

Like  sample below 

 

Category                PLANT               Plantvalue

 89                           CHO1                 P55 

 50                           CH12                  P55 

48                            CH41                  P55 

34                            DE07                  P52 

87                            PT01                  P57

AA                           CH10                  CT

SE                            RO70                  CT

VO                           CH10                  CT

DE                            RO70                 CT

 

Looking for support . thanks in advance.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Based on what I got, Try like

 

new column =
var _max = maxx(filter( PValuesID, PValuesID[Plant]= FInal[Plant]),PValuesID[Pallet ID Value])
return
if(isblank(_max), "CT", _max)

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Based on what I got, Try like

 

new column =
var _max = maxx(filter( PValuesID, PValuesID[Plant]= FInal[Plant]),PValuesID[Pallet ID Value])
return
if(isblank(_max), "CT", _max)

 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you @amitchandak  sir 

 

 I am used below  Dax its working sir 

P.ID Code = IF(ISERROR(VALUE(FInal[cat])),"CT",LOOKUPVALUE(PValuesID[Pallet ID Value],PValuesID[Plant],FInal[Plant]))

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.