Forum Discussion
Add column to another table
Hello,
in my report i have a table, and i want to add in this table the value of a column from anoter table.
the key between the two table is "internal_id" and the date
The trouble is when i add the value of the second table, the rows of the first are duplicated.
in my second table, i only have "Exploitation" for this vehicle and this date
How can i set this double key ?
Do i need to do this in power query ?
in sql it would be something like
select
a.internal_id
,a.date
,a.blabla
,b.blabla
from table a left join table b
on a.internal_id = b.internal_id and a.date = b.dateThanks
Hello amitchandak
thanks for your suggestion
i managed to achieve my issue with this post : https://community.powerbi.com/t5/Desktop/Add-New-Column-That-Retrieves-Value-From-Another-Table/m-p/1958275
i use the minx function, but it doesn't matter because i only have one value per vehicle and by day.
2 Replies
- amitchandakSuper User
GeekAlfPro , You can create a concatenated column and use that to join in merge query if needed
- GeekAlfProHelper V
Hello amitchandak
thanks for your suggestion
i managed to achieve my issue with this post : https://community.powerbi.com/t5/Desktop/Add-New-Column-That-Retrieves-Value-From-Another-Table/m-p/1958275
i use the minx function, but it doesn't matter because i only have one value per vehicle and by day.