Forum Discussion

ThisIsIt's avatar
ThisIsIt
Frequent Visitor
5 years ago
Solved

Switch not finding Columns

Hello Everyone!  Hope you all can help!

 

I'm trying to create a Switch fomula, but it doesn't seem to be able to find the columns I was to evaulate.  Only seems to find any existing measures I have.  Below is an example of what I'm trying to create.

 

NewColumn =
SWITCH ( TableA[ColumnA],
"Mud", "Dirt",
"Beach Sand", "Dirt",
"Clay", "Dirt"
,TableB[ColumnB]
)
 
Thanks!
  • ThisIsIt , You not be able use column from another table like this

     

    NewColumn =
    SWITCH ( TableA[ColumnA],
    "Mud", "Dirt",
    "Beach Sand", "Dirt",
    "Clay", "Dirt"
    ,TableB[ColumnB] //this one wrong
    )

     

    Based on relation, check my video for three ways https://www.youtube.com/watch?v=czNHt7UXIe8

    example

    related(TableB[ColumnB])

     

    maxx(relatedtable(TableB),TableB[ColumnB])

     

    Two more in video

1 Reply

  • ThisIsIt , You not be able use column from another table like this

     

    NewColumn =
    SWITCH ( TableA[ColumnA],
    "Mud", "Dirt",
    "Beach Sand", "Dirt",
    "Clay", "Dirt"
    ,TableB[ColumnB] //this one wrong
    )

     

    Based on relation, check my video for three ways https://www.youtube.com/watch?v=czNHt7UXIe8

    example

    related(TableB[ColumnB])

     

    maxx(relatedtable(TableB),TableB[ColumnB])

     

    Two more in video