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 Apps / "Expected operator [.....
Power Apps
Answered

"Expected operator [...]" Error

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Getting this error on the Items property of my gallery.

 

"Expected operator. We expect an operator such as +, *, or & at this point in the formula."

 

Can someone spot what's causing it? For context, the code works fine until I add the Filter function.

 

===

 

//Switch function used to sort two columns on the screen

Switch(

    _SortColumnPref,

    "EmpID",

    Sort(

        _tblTrainer,

        'Employee ID',

        If(

            _SortEmpIDColumn,

            Ascending,

            Descending

        )

    ),

    "Trainer",

    SortByColumns(

        _tblTrainer,

        _SortColumnName,

        If(

            _SortTrainerColumn,

            Ascending,

            Descending

        )

    )

);

 

//Used to filter items in the gallery

Filter(_tblTrainer, Title = Dropdown1.Selected.Title)

Categories:
  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Figured it out. My Filter function needs to live within my Switch function; however, I simplified my code so I'm only using one variable between my sort columns; doing away with my Switch function. Doing so means I only have to add my Filter function once.

     

    SortByColumns(Filter(_tblTrainer,Title = Dropdown1.Selected.Title), _SortColumnPref, _SortColumn1)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 248 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 192 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 135

Last 30 days Overall leaderboard