Forum Discussion
Getting the value from the excel sheet for 2 different columns and rendering it in power BI
- 9 years ago
Hi sridevi,
Because there doesn’t exist any relationshipbetween two tables, to return the value from Keyword_Trade_Name table, you need to join these two tables:
crossjoinTbl = ADDCOLUMNS(CROSSJOIN(Keyword_Trade_Name,Table_Test),"match value",IF(FIND(Keyword_Trade_Name[Trade_Name],Table_Test[End User Trade Name],,0)>0,Keyword_Trade_Name[value],0))
Select columns from this new table to add to table visualization.
If you have any question, please feel free to ask.
Best regards,
Yuliana Gu
Try the following
1. Add an Index column to your table containing KeyWord_Trade_Name against each Name starting with 1 and on.
So yourKeyWord_Trade_Name will have columns Name,Score,Index
2. Create a column in Table_test as follows
MatchedIndex=
SUMX(SearchNames,
If (FIND(UPPER(KeyWord_Trade_Name [Name]),
UPPER(Table_test [EndUserName]),,0
) >0,(KeyWord_Trade_Name [Index])-2999997,9999999 )
)
4. This would return the values as 1,2,3.... depending on the match or else 999999.
5. In the Mange relationship create relationship between KeyWord_Trade_Name[Index] and Table_test[MatchedINdex]
6. Create a column in Table_test
NewScoreTrade = Related(KeyWord_Trade_Name [Score])
7. Now plot the reports with NewScoreTrade , this will be dynamic then.
8. The only thing I am unable to explain why in the If conditions one needs to put the odd numbers like 2999997. This number to subtract varies based on the else value 9999999. If you change the else value you have to change the 2999997 also accordingly.
Try it out if it solves your issue please accept this as a solution and also give KUDOS.
Cheers
CheenuSing