cancel
Showing results for
Search instead for
Did you mean:
Zeur_Edwin Frequent Visitor

## Comparing Cell content, strings, from 3 different tables

I have 3 tables that have a relation.

I like to check if certain attributes are equal for all 3 tables. These attributes can be numbers, text, a combination or a boolean.

I expect one generic way as a solution, a kind of string comparison independed if its text or numbers.

Please advice

1 ACCEPTED SOLUTION

Accepted Solutions Community Support Team

## Re: Comparing Cell content, strings, from 3 different tables

Edit relationship among these tables Create measures in Sheet7

```Compare1 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at1]),FILTER(Sheet7,[at1]=MAX(Sheet8[at1])))
var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at1]),FILTER(Sheet7,[at1]=MAX(Sheet9[at1])))
return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")Compare2 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at2]),FILTER(Sheet7,[at2]=MAX(Sheet8[at2])))           var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at2]),FILTER(Sheet7,[at2]=MAX(Sheet9[at2])))           return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")Compare3 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at3]),FILTER(Sheet7,[at3]=MAX(Sheet8[at3])))           var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at3]),FILTER(Sheet7,[at3]=MAX(Sheet9[at3])))           return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")``` Best Regards

Maggie

5 REPLIES 5 Super User

## Re: Comparing Cell content, strings, from 3 different tables

@Zeur_Edwin Any sample data and expected output will be really helpful to provide any solution.

Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !

Zeur_Edwin Frequent Visitor

## Re: Comparing Cell content, strings, from 3 different tables

An example fist the tables, second the wanted result.   Super User

## Re: Comparing Cell content, strings, from 3 different tables

@Zeur_Edwin Did you tried merging all these tables into single table (Joining by Identifier field) using "Merge Queries" option and then comparing all three fields against each other (which will be straight forward as all fields will be in single table after merging).

Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !

Zeur_Edwin Frequent Visitor

## Re: Comparing Cell content, strings, from 3 different tables

Ii concerns about 40k items with each ~30 attributes and that data can vary every day. So adding it all in one list would not be benificial. Community Support Team

## Re: Comparing Cell content, strings, from 3 different tables

Edit relationship among these tables Create measures in Sheet7

```Compare1 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at1]),FILTER(Sheet7,[at1]=MAX(Sheet8[at1])))
var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at1]),FILTER(Sheet7,[at1]=MAX(Sheet9[at1])))
return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")Compare2 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at2]),FILTER(Sheet7,[at2]=MAX(Sheet8[at2])))           var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at2]),FILTER(Sheet7,[at2]=MAX(Sheet9[at2])))           return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")Compare3 = var com1=CALCULATE(DISTINCTCOUNT(Sheet7[at3]),FILTER(Sheet7,[at3]=MAX(Sheet8[at3])))           var com2=CALCULATE(DISTINCTCOUNT(Sheet7[at3]),FILTER(Sheet7,[at3]=MAX(Sheet9[at3])))           return IF(com1<>BLANK()&&com2<>BLANK(),"equal", "inequal")``` Best Regards

Maggie

## Helpful resources

Announcements Top Ideas Top Kudoed Authors
Users Online
Currently online: 297 members 3,107 guests
Recent signins:
• GuillemXII • daysar • guimatheus92 • Michael_Bln • Buffalo1994 • VictorEPC • leb1_14 Please welcome our newest community members:
• daysar • ArnoldS • CarlaStepStone • willynasa • okikuswanda • OtherDave • mjgirouard 