+ Reply to Thread
Results 1 to 7 of 7

Power query using let statement

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    608

    Power query using let statement

    Hi is there a way to defince different part of a calucaltion using let ;

    example I have the a number from the previous row ;

    Please Login or Register  to view this content.
    and would like to divide this by the same column number in the current row, just using / [Row] does not work, so I wanted to do something like

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by Dicken; 09-11-2022 at 01:47 PM. Reason: spelling

  2. #2
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Power query using let statement

    Seems overly complicated when all you need for that column is:

    Please Login or Register  to view this content.
    Rory

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    608

    Re: Power query using let statement

    Hi Rorya
    Well, I was more interested in how to do it rather than it being the best way of posting. Is it possible to have multiple let and in statements to use? I'm pretty certain it is only I keep getting an error.


    Richard

  4. #4
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Power query using let statement

    Why do you want multiple let statements when all you need is one, since each step is already a variable - i.e.

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    608

    Re: Power query using let statement

    Well I thought I'd seen it done, so thought I'd try.

    Perhaps it's not possible, i just thought it might prove useful, I spent a lot of time using iterative formulas in excel which I didn't have much use for but later proved very useful in a job I had.
    RD

  6. #6
    Forum Expert rorya's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365 Ent Monthly Channel / Insiders Beta
    Posts
    8,903

    Re: Power query using let statement

    I don't see the connection to iteration. Are you referring to recursion, which is very different from your example?

  7. #7
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    608

    Re: Power query using let statement

    Sorry, no I wasn't, just the point that sometimes things for which don't seem much use turn out to useful at some future date.

    RD

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 6
    Last Post: 06-25-2022, 11:00 AM
  2. IF statement and VLOOKUP functionality in Power Query
    By zz_zz11 in forum Excel General
    Replies: 1
    Last Post: 02-22-2021, 07:41 AM
  3. [SOLVED] If-Or statement Formula for Power Query
    By Eric Tsang in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-12-2021, 08:12 AM
  4. If - And Statement in Power Query
    By brent_milne in forum Excel General
    Replies: 1
    Last Post: 09-17-2020, 02:27 PM
  5. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  6. [SOLVED] Power Query - One works the other does not (replace with if statement) - Why?
    By learning new things in forum Excel General
    Replies: 13
    Last Post: 08-20-2018, 09:46 PM
  7. Sub-Forum for Excel Power Tools (Power Query, Power Pivot & Power BI)
    By chullan88 in forum Suggestions for Improvement
    Replies: 10
    Last Post: 06-28-2018, 02:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1