web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Power FX Filter Datave...
Power Apps
Suggested Answer

Power FX Filter Dataverse Table - Self

(1) ShareShare
ReportReport
Posted on by 16
Hi,
 
I have a requirement to self filter dataverse table and pull the Assigned rows which does not have associated Submitted rows present in same dataverse table. Below is sort of what I want however this clearly does not work and I am here seeking for possible solution ? Similar to SQL Subquery 
 
SQL 

Select * from  [dbo].[stages] where stagename = 'Assigned' and uniqueid not in (
Select distinct uniqueid
 from [dbo].[stages] where stagename = 'Submitted'
  )
 
POWER FX Desired but does NOT work
 

Filter(
    Stages,
    stage = 'Stage (Stages)'.Assigned &&
    !(UniqueID in ShowColumns(
        Filter(
            Stages,
            stage = 'Stage (Stages)'.Submitted
        ),
        UniqueID
    ))
)
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    I re-wrote it for you as you have it in SQL put in Power FX
     
    Filter(Stages,
           stage = 'Stage (Stages)'.Assigned And
           Not(UniqueID in Distinct(Filter(Stages, stage = 'Stage (Stages)'.Submitted),UniqueID))
    )
  • ay26274 Profile Picture
    16 on at
     
    Filter(Stages,
           stage = 'Stage (Stages)'.Assigned And
           Not(UniqueID in Distinct(Filter(Stages, stage = 'Stage (Stages)'.Submitted),UniqueID))
    )
     
     
    This gives me two delegation warnings and the Nested Filter says it has invalid argument.
    I went with creating two collections and filter each other which works. 
    It could have been great if I could do it directly on Dataverse through Power FX instead of Collections route which is more burden on the app.
  • Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
    Hi,
     
    Please share what you got when you wrote mine, it was late.
     
    The Delegation warnings are easy enough to get rid of, and your problem isn't hard to solve :-) But we answered based on the little info we have (no access to see your lists, tables, names, etc) so we have to guess.
     
    Let me know. It's better to learn to do it the right way one time :-).
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard