Forum Discussion
community_pinki
5 years agoHelper II
LOOKUPVALUE DAX with Many to Many relationship
Hi All, I want to retrive ImageURL column from creators image table to creator data table using LOOKUPVALUE() Dax and tables are connected many to many relationship with CastID column. ...
- 5 years ago
Hey community_pinki ,
when you have a many to many relationship a lookup will not give you a clear answer.
It's like I ask you "It's January, what year is it?".
But you can for example do a MAX of the URL:
ImageURL Column = VAR vCastID = Creator_Data[CastID] RETURN CALCULATE( MAX( Creator_ImageTable[Image URL] ), Creator_ImageTable[CastID] = vCastID )If you need any help please let me know.If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍Best regardsDenisBlog: WhatTheFact.biFollow me: twitter.com/DenSelimovic
selimovd
5 years agoMost Valuable Professional
Hey community_pinki ,
when you have a many to many relationship a lookup will not give you a clear answer.
It's like I ask you "It's January, what year is it?".
But you can for example do a MAX of the URL:
ImageURL Column =
VAR vCastID = Creator_Data[CastID]
RETURN
CALCULATE(
MAX( Creator_ImageTable[Image URL] ),
Creator_ImageTable[CastID] = vCastID
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic
community_pinki
5 years agoHelper II
Hi selimovd ,
I have tried above DAX it works...Thanks