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

See when key Fabric features will launch and what’s already live, all in one place and always up to date. Explore the new Fabric roadmap

Reply
Anonymous
Not applicable

Power M Query - IN Condition

HI Team, @Anonymous @dax 

I have tried many formulas and don't seem to get a Power M query working when accessing the WEB API end point . 

Requirement is to get only a subset of data from the web . e.g. If i have 10 products i only want to extract data for Product A, B, C and ignore the remaining 7 .  I can easily extract all the data and filter for the only 3 which i don't want to do .

 

here is the sample API call which am using to get last 7 days data ..primary asset id my product id , which i want to filter and extract data from the Web 

let
Source = Xml.Tables(Web.Contents("https://" & Environment & "/System/v2/product?",
[Query=[fromEffectiveDate= "" & Date.ToText(DateTime.Date(Date.AddDays(DateTime.LocalNow(),-7)),"yyyy-MM-dd") & "",
toEffectiveDate= "" & Date.ToText(DateTime.Date(DateTime.LocalNow()),"yyyy-MM-dd") & "",
primaryAssetId="Product A, Product B, Product C" & "",
streamName="System_ml-2-0_default_out_extract_service",
outputFormat="systemml"
]])),

 

@VijChand @mqueiroz 

Appreacite your help

 

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @Anonymous 

So what does the API documentation say about retrieving a subset of products?  Sorry I can't offer specific help on this currently because I do not know the API.  Can you link to the API documentation?

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

Hi @Anonymous 

The data you can retrieve from an API is determined by the API archtitecture.  If it only allows you to retrieve data for 10 products then that's what you have to do.

My understanding from your question is that you want to retrieve data for only 3?  That will only be possible if the API works in that way.  If it doesn't support the retrieval of data for 3 specific products then you won't be able to do this.  You'll have to get data for 10 products then filter out what you don't want in Power Query.

regards

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thanks @PhilipTreacy  yes API allows us to query for subset of products . 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

May 2025 Monthly Update

Fabric Community Update - May 2025

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