Forum Discussion

Ovette Abejuela's avatar
Ovette Abejuela
Copper Contributor
Mar 23, 2018

Power Query | Transformations via Folder Connector (manual)

Hi,

 

I was trying to understand how does this work:

 

 

So, I created the

1. Sample File first

2. then the Sample File Parameter1

3. Transform Sample File from Query1

4. the function Transform File from Query1

 

Everything seems to llok fine except that the function Transform File from Query1 is not receiving the transformation that I do from Sample File Query1.

 

I do have a purpose why I'm trying to learn this but that would be a different story. Can anyone help me with the above please?

 

Note:

#3 and #4 has the same exact codes except ofcourse for #4 where you have the parameter above and the step it will retun to like:

  

Code in #3 

let
    Source = Excel.Workbook(#"Sample File Parameter1", null, true),
    Count_Sheet = Source{[Item="Counts",Kind="Sheet"]}[Data],
    #"Filtered Rows" = Table.SelectRows(Count_Sheet, each ([Column1] <> null))
in
    #"Filtered Rows"

Code in #4 

let
    Source = (#"Sample File Parameter1") => let
        Source = Excel.Workbook(#"Sample File Parameter1", null, true),
        Count_Sheet = Source{[Item="Counts",Kind="Sheet"]}[Data],
        #"Filtered Rows" = Table.SelectRows(Count_Sheet, each ([Column1] <> null))
    in
        #"Filtered Rows"
in
    Source

but if I add more steps to #3, it does not reflect in #4. And even if I manually copy all the step applied in #3 to #4 it does not reflect to the main query.

 

My version doesn't even have the Edit Function warning when I try to open it in the Advanced Editor.

 

  • Ovette Abejuela's avatar
    Ovette Abejuela
    Copper Contributor

    Hi,

     

    Whoeever is following this, just an update:

     

    I was able to resolve this statement:

     

    "...but if I add more steps to #3, it does not reflect in #4. And even if I manually copy all the step applied in #3 to #4 it does not reflect to the main query."

     

    I did something wront with the Table.ExpandTableColumn line.... 

     

    instead of using this:

     

    #"Expand Data" = Table.ExpandTableColumn(#"Removed Other Columns", "Transform File from Query1", Table.ColumnNames(#"Transform File from Query1"(#"Sample File")))
    
    

    I used something else, like

    #"Expand Data" = Table.ExpandTableColumn(Source,"Data",{"Column1","Column2","Column3","AndSoOn"})

     

    So only one problem now.... how to sync #3 to #4 every time I modify #3.

Resources