cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

In the Gallery Screen, after filter the datasource , a row appears multiple times in the Gallery, can I make this row appear only once in Gallery?

As the title indicates, how can this function be completed.

 

Thank You!

Dennis

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Dennis_Qiang ,

So do you mean that if you add distinct function with filter function, your gallery will disappear?
That's really stranage.

The formula should have no problem.

I also made a similar test and not met this problem neither.

7221.PNG

 

Have you choose right field for this gallery to display?
Since you set the gallery's Items to distinct function, you will only have Result column.

So you need to choose Result column to display in the gallery.

7222.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

3 REPLIES 3
Community Support
Community Support

Hi @Dennis_Qiang ,

Do you want to display no-repeated items in gallery?

Could you tell me

1)which column do you want to be no-repeated? this field's data type?

2)how does other fields display? For example: field1:1, field2:text; field1:1, field2:text1

Display no-repeated field1, then whether do you want to display field2 to be text, text1 or not display?

I assume that you only want no-repeated field1 and it is text type.

If so, you could use Distinct function.

The Distinct function evaluates a formula across each record of a table and returns a one-column table of the results with duplicate values removed. The name of the column is Result.

 

You could set the gallery's Items like this:

Distinct(Filter(...),fieldname)
//please replace fieldname with the field that you want no-repeated value

 

Here's a doc about this function for your reference:

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-distinct

 

 

Best regards,

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

Dennis_Qiang_0-1594964616983.png

 

Hi @v-yutliu-msft 

I have try this method. But Distinct doesn't work at Gallery screen and can not show the filter result.

If i remove "Distinct ". The Gallery screen will show but i want the item in redbox just appear only once!!

 

Do you have idea for this problem?  Please help!!

 

Dennis_Qiang_1-1594964788446.png

 

 

Hi @Dennis_Qiang ,

So do you mean that if you add distinct function with filter function, your gallery will disappear?
That's really stranage.

The formula should have no problem.

I also made a similar test and not met this problem neither.

7221.PNG

 

Have you choose right field for this gallery to display?
Since you set the gallery's Items to distinct function, you will only have Result column.

So you need to choose Result column to display in the gallery.

7222.PNG

 

 

Best regards,

Community Support Team _ Phoebe Liu
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

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (73,641)