Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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
| codes | no |
| a | 1 |
| b | 2 |
| c | 3 |
| d | 4 |
| e | 5 |
| f | 6 |
Table2
code |
score |
| k | 8 |
| l | 9 |
| m | 10 |
| n | 11 |
| o | 12 |
measure = 23 (11+12)
Table3
| code | no | score |
| a | 1 | 9 |
| b | 2 | |
| c | 3 | |
| d | 4 | 10 |
| e | 5 | 23 |
| f | 6 |
Kind regards,
Nocha
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!
@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
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
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()
)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |