Forum Discussion

patator35's avatar
patator35
Frequent Visitor
8 years ago
Solved

Using GetValue (NamedCell) and Logical Type error

Hello,   I'm trying to retrieve the value of a cell in my query but end up with an error message: The part of my query getting the error is : = Table.SelectRows(#"Type modifié2",each GetValue("SQ...
  • MarcelBeug's avatar
    MarcelBeug
    8 years ago

    It looks like alternative 2 would be the one you are looking for, HOWEVER:

     

    Regarding your question if #"Filtered Rows" can be avoided: you can retrieve your data directly from the SQL database, in which case all logic may be executed on the server, which is definitely the fasted solution.

     

    If you connect directly to the SQL database, the logic will be executed on the server in either of 3 cases:

     

    1. Query folding is in place.

    Your query must be set up in such a way that the internal engine can translate the entire code to a native query, which you can check by right clicking the last step in your query and choose "Native Query": if it is greyed out, then there is no query folding, otherwise you will see the SQL-statement that is used to retrieve the data from the server (which is a translation of you entire query definition).

    It can also be that query folding is in place up to a particular step in your query.

    A statement using "Expression.Evaluate" would definitely disrupt query folding.

     

    2. Direct Query mode.

    In this case, the data is retrieved from the server once required, i.e. when visuals are displayed.

     

    3. Provide a SQL Statement (under "Advanced options") when connecting to the SQL server database.

    See screenshot below.

     

    Otherwise this is basically all I know in this area; I have no experience with it, so in case of any further questions, I will probably not be able to provide an answer.
    In that case, my advice would be to start a new topic with your specific questions (well reflected in the topic subject), as a topic with 0 replies will get attention from other helpers.