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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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