Forum Discussion
CathyT
Helper I
3 years agobuilding a table using a measure as a column name
I have a table (table1) imported from an Excel spreadsheet with over 100 columns. The number of columns increases each week. I created a copy of this table (table2) and used the pivot to search the...
djurecic
Super User
3 years agoOk, sorry, my mistake. Please try this:
table3 = SELECTCOLUMNS('table1',"dept",[Column58], "vacancies",[Column99])
Please consider accepting as solution if this answers the question- thanks!
- CathyT3 years ago
Helper I
I must not have explained my issue very well. The col_dept and col_data are measures created by searching table1 for a value. The search returns which column that value is found in this week. It will change every week so I don't want to hard code it into PowerBI. I want the entire column that each of those measures was found in.
The value of measure col_dept is "Column58" this week. The value of measure col_data is "Column99" this week. So I want to plug the values "Column58" and "Column99" into the SelectColumns function.