title: Excel Multiple data connections to same table
body: <p>I have a worksheet DATA with the table populated from json file through the Microsoft Query.
  There're different json files so I need to create several connections to any of those files.
  I also have a cell on another worksheet where I would like to indicate a parameter (for example Yesterday,Today,Tomorrow).
  According to selected parameter the table in the DATA worksheet should be populated from the related data connection (yesterday.json, today.json, tomorrow.json).
  Is it possible to do it? If yes, what would be the procedure?</p>
  <p>I have an idea that it might be possible to do by changing the filename inside the query.</p>
  <p>For example, this is my query:</p>
  <pre><code>let
  FilePath = Excel.CurrentWorkbook(){[Name=&quot;FilePath&quot;]}[Content]{0}[Column1],
  FullPathToFile1 = FilePath &amp; &quot;\json\today.json&quot;,
  Source = Json.Document(File.Contents(FullPathToFile1)),
  </code></pre>
  <p>So am thinking if there's some way to &quot;inject&quot; filename in the above query based on value of some cell.</p>
  <p>Will appreciate any help, links etc.</p>
  <p>Thanks!</p>
  <p>UPDATE:
  I have created a named cell jsonPath and put the file name in it.
  Then I have modified above query as follows, but it gives me an error.</p>
  <pre><code>    FilePath = Excel.CurrentWorkbook(){[Name=&quot;FilePath&quot;]}[Content]{0}[Column1],
  FullPathToFile1 = FilePath &amp; &quot;\json\&quot; &amp; [jsonPath],
  Source = Json.Document(File.Contents(FullPathToFile1)),
  </code></pre>