How to use any of several queries to update a single table RRS feed

  • Question

  • I would like to programmatically choose to run any of two or more queries, each of which would have the effect of updating the same table (each in a different manner, of course).

    I know how to connect a given query (which may have many steps to it) to a given table, but that is not what I want.

    Can someone tell me if this is possible, and how to do it?

    Tuesday, April 12, 2016 11:03 PM


  • First, create the queries you'd like to choose between. If you only want the programmatically chosen query to be loaded to the table, ensure that they're not loaded to the worksheet/data model.

    Next, create a blank query. Depending on the criteria for choosing one of the other queries, you'd write something like the following in the formula bar:

    = if SomeValue > 10 then Query1 else if SomeValue < 1 then Query2 else Query3


    Tuesday, April 19, 2016 7:02 PM