Forum Discussion
Get Table Object based on String
- 3 years ago
Hi Mikelytics ,
you could use the function Expression.Evaluate for it, but this won't work if you want to refresh the report in the PBI service.
Instead, I would recommend to append all 3 tables into 1 and create a "TableName" column to distinguish between them. Then you can use a Table.SelectRows command to filter the relevant table for each row, as this allows you to pass a text string.
Hi Mikelytics ,
you could use the function Expression.Evaluate for it, but this won't work if you want to refresh the report in the PBI service.
Instead, I would recommend to append all 3 tables into 1 and create a "TableName" column to distinguish between them. Then you can use a Table.SelectRows command to filter the relevant table for each row, as this allows you to pass a text string.
- Mikelytics3 years agoResident Rockstar
Hi ImkeF,
Thank you for your help! Based on your suggestion I did some further digging. Instead of the Append I now directly create the Parameter table with the Table.FromRecords function. There I can put 1 column for the names and one column for the table object itself. By that everytime when a new table comes I only have to copy a row and set all the parameters.
TO give more details for others who have a similar problem I post the approach below.
now I can use the function:
Thank you again and I wish you a great week!
Best regards
Michael