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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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

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
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.