Link to filter ref row with colum

I have two table:

Table 1, name (Car): It has (2 colums). 1 colum name “Parcela” with 16 values.
Table 2 (Hist): It has (16 colums). colum/parcela name.

So I’m trying to create a link that takes me to the details screen by filtering: that the current row is equal to the column name of the other table.

LINKTOFILTEREDVIEW(“TodoL_Detail”, [_THISROW].[Parcela] = Hist[???] )

How can I reference a column that is named the same as the row. I am missing the final part of the formula.
Rows will be referenced with rows, but in this case it is a row with a column in this order.

Thank you all and sorry if I have made any grammatical errors.

Solved Solved
0 2 69
1 ACCEPTED SOLUTION

You can’t, column names can’t be dynamic. You have to set up your expression like this:

SWITCH(
  column-name ,

  "col-name-1" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-1] ) ,

  "col-name-2" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-2] ) ,

  ... ,

  "col-name-16" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-16] )

)

(or alternatively use IFS, but SWITCH is probably better.

View solution in original post

2 REPLIES 2

You can’t, column names can’t be dynamic. You have to set up your expression like this:

SWITCH(
  column-name ,

  "col-name-1" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-1] ) ,

  "col-name-2" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-2] ) ,

  ... ,

  "col-name-16" , 
  LINKTOFILTEREDVIEW( “TodoL_Detail”, [_THISROW].[Parcela] = [col-name-16] )

)

(or alternatively use IFS, but SWITCH is probably better.

Thanks you so much, It works with switch!

Top Labels in this Space