Forum Discussion
Anonymous
6 years agoNot applicable
Compare value in two tables
Hello, I am trying to compare a single value in two table columns ie. "Table A[values] to Table B[values]" and if they match place a "Yes" in new column or "No" if no match. My DAX code listed i...
- 6 years ago
Hi,
Just in case you want to solve this without creating a relationship between the 2 Tables, write this calculated column in Table2
Column = if(ISBLANK(LOOKUPVALUE(Table1[Records],Table1[Records],Table2[Received])),"No","Yes")Hope this helps.
Ashish_Mathur
Super User
6 years agoHi,
Just in case you want to solve this without creating a relationship between the 2 Tables, write this calculated column in Table2
Column = if(ISBLANK(LOOKUPVALUE(Table1[Records],Table1[Records],Table2[Received])),"No","Yes")
Hope this helps.
dronik
Helper I
1 year agohello Ashish_Mathur
I want to use this solution in one of my reports. The question is - how to apply this based on filtering applied in Table2? Lets say I have below data. I want to match Table2 IDs that have same ID that Table1 and Table2 Country is equal to France.
- Ashish_Mathur1 year ago
Super User
Hi,
Write this calculated column formula
Result = and('Table2'[Country]="France",calculate(countrows('Table2'),filter('Table1','table1'[ID]=earlier('Table2'[ID])))>0)