Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Microsoft Dataverse
Answered

I'm confused with 'Choice' columns and the filtering in Canvas apps

(0) ShareShare
ReportReport
Posted on by 661

So, I think I'm a little confused.

 

I have a Dataverse Table with the following settings: for the Column - 'Approval Status'

approvalsettings.png

 

When comparing them / trying to filter in Canvas I find I usually have to refer to them as = 10 for Pending approval etc. 

Doesn't seem to work when trying to use the Text values.

 

Eg, In a gallery I am using the below which works.:

 

Sort( 
 Filter(GB_Recipients, 'Approval status' = 20),
'Created On',
SortOrder.Descending
)

 

But this doesn't:

 

Sort( 
 Filter(GB_Recipients, 'Approval status' = "Approved"),
'Created On',
SortOrder.Descending
)

I want to compare to the actual text instead of the number value.

 

What am I doing wrong 🙂

 

Thank you
 

Categories:
  • RandomDept Profile Picture
    661 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    Thanks again, you rock!

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    @RandomDept -

     

    Not sure if you saw my earlier message. You need to input the name of your Global Choice, not the Dataverse table name.

     

    You can find the name of your Global Choice via the Choices menu:

     

    Amik_1-1693534907544.png

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

     

  • RandomDept Profile Picture
    661 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    Thank you so much

  • RandomDept Profile Picture
    661 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    No luck on the local version either sadly 😞

    Untitled.png

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    @RandomDept - see the earlier message

  • RandomDept Profile Picture
    661 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    Thank you!

     

    query.png

     

    errors.png

  • Verified answer
    Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    @RandomDept - I just noticed the name of your Global Choice is "Approval".

     

    Change the expression to:

     

    Sort(
     Filter(
     GB_Recipients,
     'Approval status' = [@Approval].Approved
     ),
     'Created On',
     SortOrder.Descending
    )

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    @RandomDept could you share an image of the error message in the expression

  • RandomDept Profile Picture
    661 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    Thank you, sadly I'm getting:

     

    Name isn't valid 'Approval status' isn't recognized.

    Invalid use of '.'

    Incompatible types for comparison

     

  • Ami K Profile Picture
    15,665 Super User 2024 Season 1 on at
    Re: I'm confused with 'Choice' columns and the filtering in Canvas apps

    @RandomDept ,

     

    For a Local Choice, try:

     

    Sort(
     Filter(
     GB_Recipients,
     'Approval status' = 'Approval status (your table plural name)'.Approved
     ),
     'Created On',
     SortOrder.Descending
    )

     

     

    For a Global Choice, try:

     

    Sort(
     Filter(
     GB_Recipients,
     'Approval status' = [@'Approval status'].Approved
     ),
     'Created On',
     SortOrder.Descending
    )

     

     

    ------------------------------------------------------------------------------------------------------------------------------

     

    If I have answered your question, please mark your post as Solved. Remember, you can accept more than one post as a solution.

    If you like my response, please give it a Thumbs Up.

    Imran-Ami Khan

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

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Microsoft Dataverse

#1
stampcoin Profile Picture

stampcoin 17

#2
mmbr1606 Profile Picture

mmbr1606 15 Super User 2025 Season 1

#3
ankit_singhal Profile Picture

ankit_singhal 11 Super User 2025 Season 1

Overall leaderboard

Featured topics