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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
jack555
Advocate II
Advocate II

Conditional Relationship to multiple tables

In a column there are few categories. Each category has some lookup values in each dimension table. Would like to pull the related lookup value from the respective dimension table. Below is the scenario. I want to create a column in fact table same like highlighted in orange colour. Please advise the syntax for the calculated column. 

 

Screenshot_20221021-201539_Teams.jpg

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@jack555 Maybe:

Column in Fact Table = 
  VAR __Label = [Label]
RETURN
  SWITCH([ID],
    "ED",MAXX(FILTER('ED Dimension',[ID] = __Label),[Label]),
    "IP",MAXX(FILTER('IP Dimension',[ID] = __Label),[Label]),
    "OP",MAXX(FILTER('OP Dimension',[ID] = __Label),[Label]),
    BLANK(),
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Community Champion
Community Champion

@jack555 Maybe:

Column in Fact Table = 
  VAR __Label = [Label]
RETURN
  SWITCH([ID],
    "ED",MAXX(FILTER('ED Dimension',[ID] = __Label),[Label]),
    "IP",MAXX(FILTER('IP Dimension',[ID] = __Label),[Label]),
    "OP",MAXX(FILTER('OP Dimension',[ID] = __Label),[Label]),
    BLANK(),
  )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (1,518)