Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Selecting columns by column number

Hi,

I am trying to grab columns by column number in hopes of parameterizing the column selection.

I want to be able to dynamically grab values from different columns depending on what the user has selected.

 

I currently have 2 tables, table1 has 10 rows each representing a possible column that could be individually selected from table2 which has 10k rows and 10 columns.

The problem I want to solve is, if row 1 in table1 has been selected, I would like to perform a lookup from column1 in table2.

 

row 2 table 1 > column 2 table2

row 3 table1 > column 3 table2

so on and so forth


I would not need to return the entire column just a row specified by filter clicking with the corresponding required column.

 

Essentially i would like to do a dynamic vlookup in powerbi. 

Does anyone know how this can be done? 

Thanks in Advance,

Vizwiz 

 

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Anonymous ,

    Current power bi not support to use column name to get data from specific table field values.

    I'd like to suggest you to do unpivot column on your fields to attribute and value, then you can write a formula to check correspond attribute to find out values.

    Unpivot columns (Power Query)

    Regards,

    Xiaoxin Sheng

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Current power bi not support to use column name to get data from specific table field values.

    I'd like to suggest you to do unpivot column on your fields to attribute and value, then you can write a formula to check correspond attribute to find out values.

    Unpivot columns (Power Query)

    Regards,

    Xiaoxin Sheng

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks! I unpivoted and used 2 column lookup