Forum Discussion
Access a table directly or through a variable?
I have a table that holds a list of employees. In one of my measures I want to get the employee name using the maxx function. As far as efficiency, is it better to save the the employee table in a variable first, then access the table from within the same measure, or is it better to access the employee table without using a variable? Thanks.
4 Replies
- amitchandakSuper User
wpf_ , Table in the variable will create an in-memory object. So only create it if is needed most.
- wpf_Post Prodigy
amitchandak In a row context, if the measure has a variable that contains the table, does every row query for that table and store it in memory for every row, or does BI just run query once and store it in memory, and each row calls this variable?
If it only runs the query once, then I assume it would be more efficient to store the table in a variable versus just straight query the table for every row?
- amitchandakSuper User
wpf_ , Please share the sample formulas. Need to get the exact context of what you are doing with table.