Forum Discussion
Juuls
5 years agoFrequent Visitor
Check if column value between 2 tables is equal
Hi all, Currenlty I am trying to compare values from two columns between two tables. The situation and desired outcome is as follows: Table A: Country Currency United Arab Emirates Uni...
- 5 years ago
Hi Juuls ,
If you are creating a measure,remember to add "Max" when you wanna query a certain field.
Modify your measure as below:
Measure = IF(ISBLANK(COUNTX(FILTER(ALL('Table A'),'Table A'[Country]=MAX('Table B'[Country])&&'Table A'[Currency]=MAX('Table B'[Currnecy])),'Table A'[Country])),"Coprorate Bond" ,"Government Bond")And you will see:
If you need a calculated column,using below dax expression:
Column = IF('Table A'[Country]&'Table A'[Currency]=RELATED('Table B'[Country])&RELATED('Table B'[Currnecy]),"Government Bond","Coprorate Bond")And you will see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
Anonymous
5 years agoNot applicable
Hello,
Create new column in Table1,
Column = IF(Table1[Country]&Table1[Currency]=Table1[Country]&RELATED(Table2[Currnecy]),"Government Bond","Coprorate Bond")
or Create new column in Table2,
Column = IF(Table2[Country]&Table2[Currnecy]=Table2[Country]&RELATED(Table1[Currency]),"Government Bond","Coprorate Bond")