Showing results for 
Search instead for 
Did you mean: 
Regular Visitor

Cannot sort the gallery by the contents of a title

Hello I am working on my first power app and I got stuck at some point. I would like to filter the gallery for the value of a title (Title 8_8). The selected title on which I want to sort makes the sum of a gallery (Gallery_Hotspot_7) in the gallery (Gallery_Hotspot_4).


Schermafbeelding 2020-01-14 om 22.03.43.pngSchermafbeelding 2020-01-14 om 22.13.59.png



Accepted Solutions

Hi @Sny003 ,

Set the Text property of the Title8_8 Label in your Gallery_Hotspot_4  to following:

"Tot: " & Sum(
              Distinct(Filter('Straten in hotspot'; Hotspot.Value = ThisItem.'Benaming hotspot'); Straat.Value);
              CountIf(Filter('Geregistreerde feiten'; hoog > DateAdd(Today(); -Dropdown_time_2.Selected.ColumnStart)); Straat = Result)

Please consider take a try with above formula, check if the issue is solved.


Then you could modify your Sort formula as below:

              Distinct(Filter('Straten in hotspot'; Hotspot.Value = Hotspots[@'Benaming hotspot']); Straat.Value);
              CountIf(Filter('Geregistreerde feiten'; hoog > DateAdd(Today(); -Dropdown_time_2.Selected.ColumnStart)); Straat = Result)


Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Super User II
Super User II



If possible please give the screenshots of  error messages shown for each Red X and also for the yellow triangle as it would help for this one.

I speak Dutch. This causes the error messages to be in Dutch. Can you proceed with this?



Schermafbeelding 2020-01-14 om 22.19.43.pngSchermafbeelding 2020-01-14 om 22.21.03.pngSchermafbeelding 2020-01-14 om 22.21.27.pngSchermafbeelding 2020-01-14 om 22.22.13.png

Super User
Super User

Can you try: 


Sum works on numerics. I think you may need to reference the value in the text property of the control and convert this to a numeric using the Value function.

No result 



Why is there a Semicolon in middle of the Sum statement?


Replace with comma or double check it and see if this helps.

No result.


";" Works with the other functions. With me in the Dutch version the "," does not work.


@dynamicsedge - I believe the semi-colon ; is because Dutch language is being used and comma , is reserved as a decimal separator.

Ah yes you are right -  that is correct in this case @PaulD1 for the Dutch semicolon.


Do you mean like this?


Schermafbeelding 2020-01-14 om 22.52.39.png

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (12,803)