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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Mvumelwano
Helper I
Helper I

lookup without common column

HI Team,

Please assist with DAX, I have 2 tables (Table 1 and Table 2) and i need table 3 (see below example). always "a" = "I" and "d" = "m" and "e" = a measure (n+o)

Table1

codesno
a1
b2
c3
d4
e5
f6

 

Table2

 

code

 

score

k8
l9
m10
n11
o12

measure = 23 (11+12)

 

Table3

codenoscore
a19
b2 
c3 
d410
e523
f6 

 

Kind regards,

Nocha

 

7 REPLIES 7
v-diye-msft
Community Support
Community Support

Hi @Mvumelwano 

 

If you've fixed the issue on your own please kindly share your solution. if the above posts help, please kindly mark it as a solution to help others find it more quickly.thanks!

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
amitchandak
Super User
Super User

@Mvumelwano , create a new column in table1 like and then use that in lookup or join

Switch(True(),
[codes] = "a" ,"I" ,
[codes] = "d" , "m",
[codes] = "e" , "a" ,""
)

@amitchandak Thank you so much , i see i will be able to do a lookup but what about my last value which is a measure ? "e" = 23

please see below table 2.

 

Kind regards

Mvumelwano

az38
Community Champion
Community Champion

@Mvumelwano 

create a Bridge Table by enter data manualy:

Code table1 Code table2
a I
d m
e e

 

create a relationshhips Table1 - bridge and table2 - bridge

and add what you need to visual


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Greg_Deckler
Super User
Super User

Soooo, what is the logic to get from Table1 and Table2 to Table3??

Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler 

 

Logic : always "a" = "I" and "d" = "m" and "e" = a measure (n+o)

 

Thank you

Kind regards,

Mvumelwano

Perhaps create a measure like:

 

 

New Measure = 
  SWITCH(MAX('Table1'[codes]),
    "a",LOOKUPVALUE('Table2'[score],'Table2'[code],"l"),
    "d",LOOKUPVALUE('Table2'[score],'Table2'[code],"m"),
    "e",[measure],
    BLANK()
  )

 


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.