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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jmkvalsund
Helper III
Helper III

Filtering data from web source

I've set up a web datasource where I would like to change the filter, but don't know how.
This is part of my current query:


""code"": ""Period"",
""selection"": {
""filter"": ""item"",
""values"": [
""2022M01"",
""2022M02"",
""2022M03""

As you can see, I'm reading data and filtering on column "Period" pr year and month. But when using "item" and "values" I have to manually add new values monthly. If I add values not present in the returning data, I get an error. Is there an operator that in this case can say like "When period less than 2022M12 " to get data for 2022 without me editing the query each mont?

Regards,

John Martin

1 ACCEPTED SOLUTION
jennratten
Super User
Super User

Hello!  There are ways to filter within the URL, however what is allowed varies wildly by site.  Below is a link that shows many examples of filter scenarios for the Microsoft Graph API.

https://docs.microsoft.com/en-us/graph/query-parameters 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jmkvalsund ,

 

"2022M02" appears to be in text format, so it doesn't seem like you want to be less than "2022M02".

You could try 

= Table.SelectRows(#"Changed Type", each [values] = "2022M01")

 

 

Best Regards,

Stephen Tao

 

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

jennratten
Super User
Super User

Hello!  There are ways to filter within the URL, however what is allowed varies wildly by site.  Below is a link that shows many examples of filter scenarios for the Microsoft Graph API.

https://docs.microsoft.com/en-us/graph/query-parameters 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors