Forum Discussion

deniztopcu's avatar
deniztopcu
Frequent Visitor
4 years ago
Solved

Download Multiple stock Price

Hello,

This is in need of help. I am not proficient in M ​​language. I am trying.

I think there is a problem in this part.

-----------------------------------------------------------------------

 

I want to get a result like in the picture.

-----------------------------------------------------------------------------

One Stock working:

https://docs.google.com/spreadsheets/d/1Qykawx2XFeAMA3CLKBR_HMZWqHxbKn_C/edit?usp=sharing&ouid=10016... 

 

Multiple Stock Not working:

https://docs.google.com/spreadsheets/d/1XKAuCBYw7niq7I0FrgZeBVZ9-VAuj1xg/edit?usp=sharing&ouid=100168892057862638513&rtpof=true&sd=true 

  • Hi deniztopcu ,
    looks like changing your query to:

     

     

    (Symbol as text) =>
    let
      //Symbol = "FENER",
        BaseURL = Excel.CurrentWorkbook(){[Name="Çeyrek_URL"]}[Content],
        #"Added Custom" = Table.AddColumn(BaseURL, "ModifiedURL", each Text.Replace([URL],"SYMBOL",Symbol)),
        ///????
    
        #"Değiştirilen Tür" = Table.TransformColumnTypes(#"Added Custom",{{"Ceyrek", type date}, {"URL", type text}}),
        
        #"Özel Eklendi" = Table.AddColumn(#"Değiştirilen Tür", "Özel", each fnQuarterPrice([ModifiedURL])),
        #"Removed Errors" = Table.RemoveRowsWithErrors(#"Özel Eklendi", {"Özel"}),
        #"Kaldırılan Hatalar" = Table.RemoveRowsWithErrors(#"Removed Errors", {"Özel"}),
        #"Genişletilen Özel" = Table.ExpandTableColumn(#"Kaldırılan Hatalar", "Özel", {"Column1.HGDG_KAPANIS"}, {"Özel.Column1.HGDG_KAPANIS"}),
        #"Kaldırılan Yinelenenler" = Table.Distinct(#"Genişletilen Özel")
    in
        #"Kaldırılan Yinelenenler"

     

     

    does the job.
    (Attached file as well)

4 Replies

  • ImkeF's avatar
    ImkeF
    Community Champion

    Hi deniztopcu ,
    looks like changing your query to:

     

     

    (Symbol as text) =>
    let
      //Symbol = "FENER",
        BaseURL = Excel.CurrentWorkbook(){[Name="Çeyrek_URL"]}[Content],
        #"Added Custom" = Table.AddColumn(BaseURL, "ModifiedURL", each Text.Replace([URL],"SYMBOL",Symbol)),
        ///????
    
        #"Değiştirilen Tür" = Table.TransformColumnTypes(#"Added Custom",{{"Ceyrek", type date}, {"URL", type text}}),
        
        #"Özel Eklendi" = Table.AddColumn(#"Değiştirilen Tür", "Özel", each fnQuarterPrice([ModifiedURL])),
        #"Removed Errors" = Table.RemoveRowsWithErrors(#"Özel Eklendi", {"Özel"}),
        #"Kaldırılan Hatalar" = Table.RemoveRowsWithErrors(#"Removed Errors", {"Özel"}),
        #"Genişletilen Özel" = Table.ExpandTableColumn(#"Kaldırılan Hatalar", "Özel", {"Column1.HGDG_KAPANIS"}, {"Özel.Column1.HGDG_KAPANIS"}),
        #"Kaldırılan Yinelenenler" = Table.Distinct(#"Genişletilen Özel")
    in
        #"Kaldırılan Yinelenenler"

     

     

    does the job.
    (Attached file as well)

    • deniztopcu's avatar
      deniztopcu
      Frequent Visitor

      Thank you so much. For your efforts in this thread. A very positive result for me.🌻🌻🌻

  • artemus's avatar
    artemus
    Microsoft Employee

    Add to the end of the BaseURL step: [Column]{Row - 1}

    Replace Column with the column that contains the url and Row with the row number.

    • deniztopcu's avatar
      deniztopcu
      Frequent Visitor

      artemus 

      I tried what you said but it still gives an error.

       

      represents a single row.
      in the table (Çeyrek_URL),
      in the "URL column"
      should get all URLs. and should be for each symbol.