Quantcast
Channel: All Power Query posts
Viewing all articles
Browse latest Browse all 122256

Check if query exists

$
0
0

Hi all,

 

I have a report with 2 elements in PowerQuery :

  • A function returning a table ==> creating queries "Invoked Function", "Invoked Function (2)",  "Invoked Function (3)", etc.
  • A query that appends all results of invoked functions

The query thus needs to check if every occurence of the invoked function exists, so I'm looking for a way to write :

queries = {"Invoked Function", "Invoked Function (2)", "Invoked Function (3)", ... , "Invoked Function (10)"},

if exists(#queries{i}) then A else B

 

Both steps can be done through List.Accumulate, but I can't find a way to test if the query exists.

 

I guess another similar would be : how to refer to a query from a string ? The following doesn't work :

my_string = "that_query",

source = #my_string          (#"that_query" does work)

 

Thanks !


Viewing all articles
Browse latest Browse all 122256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>