none
Restrictions when using Expression.Evaluate? RRS feed

  • Question

  • In order to dynamically choose which query to reference I'm using Expression.Evaluate like this:

    = Table.Combine({Dispo, Expression.Evaluate(Table.SelectRows(EYs, each ([EY] = ParaPlan))[VorhPlan]{0}, #shared)})

    It returns everything correct and complete in the preview-window.

    However, when I try to load it into the spreadsheet, the following error is thrown and the download doesn't complete:

    Am I doing sth wrong here or are there know restrictions when using Expression.Evaluate?


    Imke Feldmann TheBIccountant.com

    Friday, April 22, 2016 7:25 PM
    Moderator

Answers

  • The query that's run in refresh is a trimmed version of the query that's run in the editor. In particular, a kind of static analysis is used to remove any queries which don't appear to be used in the top-level refresh query. This decision predates me, so I'm not sure about its motivations. Arguably, the presence of #shared should disable this trimming.

    In general, the combination of Expression.Evalute and #shared is dangerous as it prevents us from statically analyzing the query. For instance, this isn't supported for service refresh inside Power BI.

    Monday, April 25, 2016 2:33 PM

All replies