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
grooble
Frequent Visitor

get column data for web lookup

I am using a web lookup to get Facebook data in to a table.
Here is the data that I can get out in to a Post table, where each row is a single post:
posts_table.PNG

So this is working well.

 

The next thing I want to do is use the id column from the above table to get the comments for each post.

 

Looking at the Facebook Graph api, there is a way to pull comments for multiple posts in a single "batch" request.

This is what I will do in the following Comments query:

let
    Source = Json.Document(Web.Contents("https://graph.facebook.com/v4.0/comments?ids=4317533336*****_11936468075*****,4317533336*****_11924034843*****&access_token=mytoken"))
in
    Source

The above url will get me two comments into a new table and this is also working ok.

 

What I want to do is take the ids from the Posts table and insert them into the Comments query above, so that the url will look like this:

https://graph.facebook.com/v4.0/comments?ids=id1,id2,...,idn&access_token=mytoken

...where id1, id2 etc are from the [id] column of the Posts table.

How do I accomplish this?

2 REPLIES 2
amitchandak
Super User
Super User

I am not sure I got it completely. But please try.

Get the position of ids and *****& and then split string based on *****

Refer

https://docs.microsoft.com/en-us/dax/text-functions-dax

Hi and thanks for your reply.
I guess it boils down to: how do I get all the IDs from the Posts table in the comments Query?

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.