locked
ways to get a single value from table RRS feed

  • Question

  • Hello All,

    I trying to get a single value from a Power Query table.

    What is better (faster and/or less resource consuming): get a list from column and then refer to a specific position (item-access-expression), or get a specified record from table and then a value from specified field from given record (field-access-expression)?

    MyValue = Source[Column1]{0} // item-access

    or

    MyValue = Source{0}[Column1] //field-access

    In my opinion, field-access should be faster, especially on big tables. Is it so?


    Maxim Zelensky Excel Inside

    Tuesday, November 3, 2015 2:06 PM

Answers

  • You should test the two approaches in order to confirm, but my guess is they will perform similarly (unless the backend source doesn't support column selection and thus we can't fold the first approach).

    Feel free to try them and post your findings here.

    Ehren

    Wednesday, November 4, 2015 7:48 PM

All replies

  • You should test the two approaches in order to confirm, but my guess is they will perform similarly (unless the backend source doesn't support column selection and thus we can't fold the first approach).

    Feel free to try them and post your findings here.

    Ehren

    Wednesday, November 4, 2015 7:48 PM
  • Thank you, Ehren

    I'll try to make tests. Is there are any tools (except measuring query refresh time in VBA) to test Power Query performance?

    PS I think that for selecting one single value a difference in methods performance really means nothing, so this question is more reasonable when we try to make a lot of value calculations, such as custom calculated column with relative references etc.


    Maxim Zelensky Excel Inside

    Wednesday, November 4, 2015 8:48 PM
  • Hi Maxim,

    Currently there aren't any built-in tools for measuring Query perf.

    Ehren

    Thursday, November 5, 2015 9:40 PM