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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

2 REPLIES 2
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

Thanks! I unpivoted and used 2 column lookup

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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