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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
PJOS_1
Frequent Visitor

OR operator inside API filter

Hi all, I've scoured the web and the forums and I can't quite figure out how the syntax of this should be written. I keep getting an error. 

 

Quite simply, I'm trying to connect Power BI to the federal government's CMS data. I can filter the data just fine with a very basic filter. For example, this works fine: 

 

"Source = Json.Document(Web.Contents("https://data.cms.gov/data-api/v1/dataset/0a33dac8-73b2-4223-83e7-d709645c3549/data?filter[PROVNUM]=1..."))"

 

What I really want to do is have data for: [PROVNUM]=115404 OR [PROVNUM] = 115376. 

 

I'm a noob at this and I've tried a million different ways. I can't seem to get the proper syntax right. I ultimately have a total of 20 PROVNUM values I'd like to daisy chain together into one table. I can call the whole table from the website but that's MASSIVE. I could write 20 queries and append it all but that's tedious and not very elegant. 

 

How can I do this? I've tried ||, OR, or, and everything in between trying to mimick other queries I've found to no avail. 

 

Thanks! 

 

 

 

 

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

According to the linked documentation, you can write it using an IN operator like this:

https://data.cms.gov/data-api/v1/dataset/0a33dac8-73b2-4223-83e7-d709645c3549/data
?filter[name-filter][condition][path]=PROVNUM
&filter[name-filter][condition][operator]=IN
&filter[name-filter][condition][value][1]=115404
&filter[name-filter][condition][value][2]=115376

View solution in original post

1 REPLY 1
AlexisOlson
Super User
Super User

According to the linked documentation, you can write it using an IN operator like this:

https://data.cms.gov/data-api/v1/dataset/0a33dac8-73b2-4223-83e7-d709645c3549/data
?filter[name-filter][condition][path]=PROVNUM
&filter[name-filter][condition][operator]=IN
&filter[name-filter][condition][value][1]=115404
&filter[name-filter][condition][value][2]=115376

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.