+ Reply to Thread
Results 1 to 4 of 4

Conditional Logic Flow in Power Query

  1. #1
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    302

    Conditional Logic Flow in Power Query

    Hi

    I have a Query (attached) that calls a table (t_Names) from the workbook.

    If the table does exist then I want the Query to perform a series of steps otherwise I want it to perform an alternative series of steps.

    How does one structure this in a Query?

    Kind Regards

    Allister
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Conditional Logic Flow in Power Query

    G12 =IFERROR(IF(MATCH($F12,$F$4:$F$8,0)>0,"OK","Error"),"Error") and drag down.

    See the attached file.
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Forum Contributor
    Join Date
    07-10-2020
    Location
    New Zealand
    MS-Off Ver
    365 personal
    Posts
    302
    Quote Originally Posted by oeldere View Post
    G12 =IFERROR(IF(MATCH($F12,$F$4:$F$8,0)>0,"OK","Error"),"Error") and drag down.

    See the attached file.
    Thanks but I was wanting Power Query solution

  4. #4
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,623

    Re: Conditional Logic Flow in Power Query

    The PQ solution could be as short as:
    Please Login or Register  to view this content.
    See attached.

    After removal of t_Names from Sheet named Table2 you have to refresh the query to see the message changes to ERRORs
    Attached Files Attached Files
    Last edited by Kaper; 07-26-2022 at 02:23 AM. Reason: removed = true in (try Excel.CurrentWorkbook(){[Name="t_Names"]}[Content])[HasError] = true
    Best Regards,

    Kaper

+ 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. [SOLVED] Fuzzy logic file downloaded but doesn't appear in power query
    By scolou2000 in forum Excel General
    Replies: 2
    Last Post: 03-29-2022, 09:53 AM
  2. [SOLVED] Power Query logic to calculate only working hours between two date/time values
    By adamnc in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-28-2021, 05:14 PM
  3. [SOLVED] Power Query/Power Pivot Conditional Column creation & chart
    By mz_h in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 12-12-2020, 06:07 PM
  4. Replies: 10
    Last Post: 06-25-2020, 12:19 AM
  5. Replies: 4
    Last Post: 02-17-2020, 06:03 AM
  6. [SOLVED] Help understanding Power Query Logic
    By Potholes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-09-2019, 02:29 AM
  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

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