web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Filter Query in Power ...
Power Automate
Answered

Filter Query in Power Automate does not work for a specific value

(0) ShareShare
ReportReport
Posted on by 8
(Tables and variable names are changed to be general. The logic of the flow should still be the same)
 
I am running a flow that lists rows from a Dataverse table, that we can call "Users" (this is a custom table). The list row action uses a filter query based on a multi-select choice column in that table. The possible options are "0", "1", and "2". Here is roughly what the table looks like:
 
Users Option(s)
A 0,1,2
B 0,1,2
C 0,1
D 0
E 1
F 2
G 0
 
 
 
The filter query I have in Power Automate is something like:
 
 
During runtime, it evaluates to:
contains(cb838_options, '1')
 
When I run the flow with option 0, it correctly filters for the 5 rows with 0. When I do option 2, it correctly filters for the 3 rows with 2. 
 
However, running it with 1 does not filter at all, and it always grabs all 7 rows. I am stumped here because it gives no error message, and I don't see why it does this issue with 1, but not 0 or 2.
Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,891 Most Valuable Professional on at
     
    It is possible it might interpret the 1 as a true value, instead of choice value. Normally I also use high numbers for custom choice values to avoid this.
     
    That being said, you can also use a different function for this, the ContainValues.
     
    For reference on the below syntax, see the documentation of the Web API:
     
    Microsoft.Dynamics.CRM.ContainValues(PropertyName='cb838_options', PropertyValues=['@{variables('Option Value')}'])



     
    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, LinkedIn, Bluesky profile or Youtube Channel
  • schoi808 Profile Picture
    8 on at
    It worked! The ContainValues function worked exactly as I was looking for. I think the old contains function did interpret 1 as true like you said, but now the issue is resolved with ContainValues. Thanks again @Expiscornovus.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard