Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
mighty
Frequent Visitor

Please assist with the following dax

Good day

I need assistance with this, I have two tables:
Table_1

NameSchool Name
JaneEast
FranceEast
CrageWest
DinaWest
JosephNorth

 

Table_2

NameSchool Name
JaneNorth
FranceEast
CrageEast
DinaWest
JosephNorth

 

I am trying to create a visualisation table, I want it to look like the one below:

If the School Name in table 1 and 2 are are not the same show the name of the school in Shool Name 2 column but if it is the same do not show it on column Shool Name2. Then after I also want to count them in the table below the number will be 2 (North and East):

I have tried the following dax measures but they are not working:

 

BlankIfNotSameSchool =
VAR SchoolName1 = SELECTEDVALUE('Table_1'[School])
VAR SchoolName2 = SELECTEDVALUE('Table_2'[School])
RETURN
    IF(
        NOT(ISBLANK(SchoolName1 )) &&
        SchoolName1 = SchoolName2,
        BLANK(),
        SchoolName2
    )
 
NameSchool Name1School Name2
JaneEastNorth
FranceEast 
CrageWestEast
DinaWest 
JosephNorth 
4 REPLIES 4
tamerj1
Super User
Super User

Hi @mighty 

what is the relationship between the two tables? Which name column is used in the table visual?

Hi @tamerj1 

It is a many to many relationship pointing only in 1 direction. I am uisng both column name. Actually to clarify,

 

Table_1

NamePreferred School
JaneEast
FranceEast
CrageWest
DinaWest
JosephNorth

 

Table_2

NameNot Preferred School
JaneEast
FranceEast
CrageWest
DinaWest
JosephNorth

 

Table Visual should look like the following:

NamePreffered SchoolNot Preferred School
JaneEastNorth
FranceEast 
CrageWestEast
DinaWest 
JosephNorth 

@mighty 

I suppose table1 filters table2. But many to many? That seems to be a bit confusing! If based on [Name] I suppose it is unique in both tables?

@tamerj1 that is correct table1 filters table2, how the relationship based is based on the email address, a column I did not include, apologies for causing confusion.

Sample data:

Table1

NamePreferred SchoolEmail
JaneEastjane@gmail.com
FranceEastfrance@gmail.com
CrageWestcrage@gmail.com
DinaWestdina@gmail.com
JosephNorthjoseph@gmail.com

 

Table2

NamePreffered SchoolNot Preferred SchoolEmail
JaneEastNorthjane@gmail.com
FranceEast france@gmail.com
CrageWestEastcrage@gmail.com
DinaWest dina@gmail.com
JosephNorth joseph@gmail.com

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.