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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Analitika
Post Prodigy
Post Prodigy

RSS in Power BI

Hello,

 

I would like to ask how to use RSS link in order to retrieve data. I used this https://nasdaqbaltic.com/statistics/en/news?rss=1&num=100&issuer= but it contains just 100 items per page, my goal is to obtain more data like per this year 2022, how I can achieve this. I will use link in Power BI.

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Analitika ,

 

You can create a query to get the result you want depend one page, and then change the url in the code to dynamic value and this query will change to a function.

After this, create a new table which contains all the value( page number ) you want. Add this table an Invoke Custom Funtion column via the function you just created.

 

You can refer this code for the query with all the page:

function:

let
    webresult = (num_1)  =>
    let
        Source = Xml.Tables(Web.Contents("https://nasdaqbaltic.com/statistics/en/news?rss="& Number.ToText(num_1) &"num=100&issuer=")),
        #"Changed Type" = Table.TransformColumnTypes(Source,{{"Attribute:version", Int64.Type}}),
        channel = #"Changed Type"{0}[channel],
        #"Changed Type1" = Table.TransformColumnTypes(channel,{{"title", type text}, {"description", type text}, {"link", type text}, {"language", type text}, {"lastBuildDate", type datetimezone}}),
        item = #"Changed Type1"{0}[item],
        #"Changed Type2" = Table.TransformColumnTypes(item,{{"title", type text}, {"link", type text}, {"pubDate", type datetimezone}, {"issuer", type text}}),
        #"Expanded guid" = Table.ExpandTableColumn(#"Changed Type2", "guid", {"Element:Text", "Attribute:isPermaLink"}, {"guid.Element:Text", "guid.Attribute:isPermaLink"})
    in
        #"Expanded guid"
in webresult

Table:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyaKsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [RSS = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"RSS", Int64.Type}}),
    #"Invoked Custom Function" = Table.AddColumn(#"Changed Type", "re", each function([RSS])),
    #"Expanded re" = Table.ExpandTableColumn(#"Invoked Custom Function", "re", {"title", "link", "pubDate", "guid.Element:Text", "guid.Attribute:isPermaLink", "issuer"}, {"re.title", "re.link", "re.pubDate", "re.guid.Element:Text", "re.guid.Attribute:isPermaLink", "re.issuer"})
in
    #"Expanded re"

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, I checked table but I see the limit of data. It is just two May days. My goal to obtain data from 2022 January to May.

Hi @Analitika ,

 

You should consult the api usage guide of the site and use the function web.contents() of the power query to simulate the request. and get the data.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.