Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
deniztopcu
Frequent Visitor

Download Multiple stock Price

Hello,

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

Expression.Error.png

I think there is a problem in this part.

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

 

Multiple.PNG

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=10016... 

1 ACCEPTED SOLUTION
ImkeF
Super User
Super User

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)

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

4 REPLIES 4
ImkeF
Super User
Super User

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)

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

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

artemus
Employee
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.

@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.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors