none
Strange reaction on my error with #shared & filter RRS feed

  • Question

  • This code leads to all the rows to have false value in the field "Type Function" of the result:

    let
        Источник = Record.ToTable(#shared),
        #"Добавлен пользовательский объект" = Table.AddColumn(Источник, "Type Function", each try [Name] <> AllQueriesExceptCustomFunctions and Value.Is([Value], type function) otherwise false),
        #"Removed Columns" = Table.RemoveColumns(#"Добавлен пользовательский объект",{"Value"})
    in
        #"Removed Columns"

    UPDATED:

    My mistake was not placing quota marks around AllQueriesExceptCustomFunctions, which is the name of the Query itself (with the code above).

    But instead of throwing an error of any kind, it behaves in the manner I described. While it's not a problem (except you're tired enough :-)), the behavior may mean that there is potential problem inside the operators, used in it. So I leave the description of the situation here just in case.

    Thursday, July 4, 2019 9:39 PM

Answers

  • Hi Miguel!

    Thanks for your answer, I'm sorry - situation is different in comparison with my initial post. I updated the post itself in order not to mislead anybody.

    • Marked as answer by Andrey Minakov Wednesday, July 10, 2019 10:20 AM
    Monday, July 8, 2019 9:10 AM

All replies

  • can't replicate the query as we don't have the value for 

    AllQueriesExceptCustomFunctions 

    but my best guess is that it has something to do with that part of your query that might be causing issues. If you try this it might give you what you need.

    let
        Источник = Record.ToTable(#shared),
        #"Добавлен пользовательский объект" = Table.AddColumn(Источник, "Type Function", each [Value] is function),
        #"Filtered Rows" = Table.SelectRows(#"Добавлен пользовательский объект", each ([Type Function] = false)),
        #"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Value"})
    in
        #"Removed Columns"

    Friday, July 5, 2019 11:21 AM
  • Hi Miguel!

    Thanks for your answer, I'm sorry - situation is different in comparison with my initial post. I updated the post itself in order not to mislead anybody.

    • Marked as answer by Andrey Minakov Wednesday, July 10, 2019 10:20 AM
    Monday, July 8, 2019 9:10 AM