Forum Discussion

mr_wizard's avatar
mr_wizard
Resolver I
3 years ago
Solved

create parameter from concatenation

I have a report that sources from several Excel files under a SharePoint site.  I'm trying to create a report-level parameter for each file to make maintenance of the sourcing easier (say, if the files or site get moved).  Because they're all under the same SharePoint site, I'd like to create a parameter for the site URL and parameters for each Excel file.  That way, for each Excel file, I can just concatenate the site parameter to some string, e.g., concatenate 'site parameter' with '\some_file_name.xlsx'.  Is it possible to create parameters this way?

  • It seems that it's not possible to create parameters from other parameters (unless you query parameters, which is not applicable in my scenario).  The solution is...

    1) create the following 3 parameters:

    parameter A = 'some super long path'

    parameter B = \Excel_file1.xlsx'

    parameter C = '\Excel_file2.xlsx'

     

    2) and then concatenate the parameters at the query level, e.g.:

    let
    FullFilePath = #"parameter A" & #"parameter B",
    Source = Excel.Workbook(File.Contents(FullFilePath ), null, true),

    ...

5 Replies