Forum Discussion

vjnvinod's avatar
vjnvinod
Impactful Individual
7 years ago
Solved

Help with advance editor

Hi Team,

 

i have the below step in the advance editor which is causing problem when i refresh the data monthly

 

#"Removed Other Columns" = Table.SelectColumns(#"Expanded Table Column1",{"US Government & Public Sector GTER Summary FY19 P08", "Column3", "Column4"})

 

the reason is every month the file name changes to US Government & Public Sector GTER Summary FY19 P09 and so on.

 

Now from FY20, the file will start coming as US Government & Public Sector GTER Summary FY20 P01 and son on.

how do i resolve this, without going to Advance editor and changing the values  everytime 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hey vjnvinod !

     

    I'm doing more work in power query/m every day. I haven't worked too much with file names; however, I did find this LINK which shows an approach that might help you overcome your obstacle. 

     

    It defines a source (i.e., directory) in advanced editor & then uses Table.SelectRows & Text.StartsWith to pull data from a file based on the characters the file name starts with. 

     

    Hope this helps.

  • Anonymous's avatar
    Anonymous
    Not applicable

    You can solve the same using parameters in powerBI, link how to use it here.

  • vjnvinod's avatar
    vjnvinod
    Impactful Individual

    Anonymous 

     

    actually the issue is not with the source data, source data is connected via folder, so no issues there.

     

    issue is with the steps inside the source data, which is not allowing the refresh to work