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 / Sort filter Distinct o...
Power Apps
Unanswered

Sort filter Distinct on a table

(0) ShareShare
ReportReport
Posted on by 16

Hi, I have this code to feed a table when toggle = true or False. The toggle name is: LbVisible.

 

If ( LbVisible.Value = false; 
Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email) ); Submitted_Time; Ascending ); 
Sort( Filter( INCO_REQUESTS; Status = "Submitted for Action" And IsBlank(Email) ); Submitted_Time; Ascending ) 
)

 

Now i would like to add Distinct value only, cause right now, i have duplicated rows.

How can i do that? 

Thank you

Categories:
I have the same question (0)
  • Wilder16261626 Profile Picture
    16 on at

    For some reason, the minute I add "Distinct", that's when I get an error. If I remove the Distinct portion of the code you gave me, it works perfectly. I will try again and get back to you, but for now, no luck.

  • Wilder16261626 Profile Picture
    16 on at

    I tried again, and when I add the Distinct code piece, I still receive the same errors:

    Wilder16261626_0-1649846995041.png

    I'm confused as to why this is happening.

  • Wilder16261626 Profile Picture
    16 on at

    For some reasons, i'm still having all those errors

    Wilder16261626_0-1649851035184.png

     

    What if i use First and groupBy to replace the Distinct?

     

    Ex:

    First(
     Filter(
     INCO_REQUESTS,
     Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email)
     )
    )

    It gives me the first record only, but if i group by 2 columns value, would that also do it?

    Ex: Group by "From" and "To" columns? 

     

    Would i have to put my GroupBy at the beginning?

  • Wilder16261626 Profile Picture
    16 on at

    I think i was able to make it work like this:

    GroupBy(
     Filter(
     INCO_REQUESTS,
     Status = "Submitted for Action" And Request_Type <> "NO TARIFF" And IsBlank(Email)
     ),
     "From",
     "To"
     )

    , but i will continue to test 

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

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 483

#2
WarrenBelz Profile Picture

WarrenBelz 399 Most Valuable Professional

#3
11manish Profile Picture

11manish 327

Last 30 days Overall leaderboard