Forum Discussion
Mikelytics
3 years agoResident Rockstar
Get Table Object based on String
Dear community, following topic. Lets say I have 3 different tables (dummy data only, the original table have multiple columns and more rows): Furthermore, I have...
- 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.
ImkeF
3 years agoCommunity Champion
Hi AntrikshSharma ,
here is why it won't work in the service: Restrictions when using Expression.Evaluate? (microsoft.com)
With regards to the load in Desktop itself: That's probably a circular dependency here: as #sections will also return the query in which it is called. Don't know why this even works in the editor, tbh.<