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

Filter

How can I filter a table to only show me the repeating field1 records

Products ----------------- filter -------------- Resulting table
field1 field2                                                    field1 field2
1         3                                                            2        4
1         4                                                            5        4
2         4                                                            6        3
3         3
3         4
5         4
6         3

4 ACCEPTED SOLUTIONS

Accepted Solutions
KrishnaV
Super User
Super User

Hi @bitgalicia ,

 

try this below:

 

ClearCollect(colls1,GroupBy(collSampleData,"Field1","Field2")); // dummy collection for grouping

ClearCollect(colls2,AddColumns(colls1, "Count", CountRows(Field2)) ,GroupBy(collSampleData,"Field1","Field2")); // dummy collection for count the repetation

Clear(collFinal);//Final collection with the desired output
ForAll(Filter(colls2,Count=1),Collect(collFinal,{Field1:Field1,Field2:First(Field2).Field2})); 

Clear(colls1);
Clear(colls2);

 

In the above code, collFinal has the required output.

 

Note: I have tested this thoroughly and it is working seamlessly as expected.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @bitgalicia ,


I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

If you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @bitgalicia ,

 

I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

If you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Thanks for giving me the solution.It works perfectly. Regards

View solution in original post

4 REPLIES 4
KrishnaV
Super User
Super User

Hi @bitgalicia ,

 

try this below:

 

ClearCollect(colls1,GroupBy(collSampleData,"Field1","Field2")); // dummy collection for grouping

ClearCollect(colls2,AddColumns(colls1, "Count", CountRows(Field2)) ,GroupBy(collSampleData,"Field1","Field2")); // dummy collection for count the repetation

Clear(collFinal);//Final collection with the desired output
ForAll(Filter(colls2,Count=1),Collect(collFinal,{Field1:Field1,Field2:First(Field2).Field2})); 

Clear(colls1);
Clear(colls2);

 

In the above code, collFinal has the required output.

 

Note: I have tested this thoroughly and it is working seamlessly as expected.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
Krishna
If this post helps you give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @bitgalicia ,


I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

If you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Hi @bitgalicia ,

 

I just want to follow up with you on this issue to see is it resolved or still you see any challenges.

If you see any challenge/need further help let me know I am always happy to help.

Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more


I hope this resolved your issue if you see any challenge/need further help please let me know I am always happy to do it for my community.

Regards,
KrishnaV
Business Applications MVP, Microsoft Certified Trainer
Twitter | Linkedin | YouTube | GitHub
If this post helps you give a and if it solved your issue consider Accept it as the solution to help the other members / new members of the community.

View solution in original post

Thanks for giving me the solution.It works perfectly. Regards

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Microsoft Ignite 768x460.png

Find your focus

Explore the latest tools,training sessions,technical expertise, networking and more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,595)