cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ChrisFromGufi
Regular Visitor

Nested Filter in a drop-down based on values from 2 tables

Hi experts, 

 

I am having difficulties on a most likely easy nested filter question I cannot find the solution.

 

I have a dropdown that should provide a list of dates based on data from 2 tables with a 1:n relationship:

 

Table 1 - tbl_Meetings 

ID (1)

MeetingDate

Table 2 - tbl_Project_Updates

ID

MeetingID (many)

 

For some Project Updates a meeting (ID) is referenced in field MeetingID in table tbl_Project_Updates.

 

In the dropdown I only want to show the meeting dates from table tbl_Meetings where MeetingID is not blank() in table tbl_Project_Updates.

 

Filter 1: It is essentially clear how to filter the records from tbl_Project_Updates where an entry was made in column MeetingID.

Filter(tbl_Project_Updates, MeetingID <> Blank())

 

However, I am not able to relate the table created in the first filter to the tbl_Meetings and show the meeting dates in the dropdown where the MeetingID from tbl_Project_Updates matches the ID from tbl_Meetings.

 

I am sure there the community will have a solution quickly.

Unfortunately, searching the previous posts did not help me either.

Thank you in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Drrickryp,

 

Thank you a lot, this was a great help. Your formula was a great basis to get to the final working code

 

The working code actually is:

 

-----------------------

Sort(

    Filter(

        AddColumns(

            GroupBy(

                tbl_Project_Updates,

                "MeetingID",

                "Rest"

            ),

            "mdate",

            LookUp(

                tbl_Meetings,

                ID = MeetingID

            ). MeetingDate

        ),

        !IsBlank(mdate)

    ),

    mdate,

    Descending

)

-----------------------

View solution in original post

3 REPLIES 3
Drrickryp
Super User
Super User

@ChrisFromGufi 

AddColumns(GroupBy(tbl_Project_Updates,MeetingID),"mdate",LookUp(tbl_Meetings,ID=MeetingID).MeetingDate)

Drrickryp
Super User
Super User

@ChrisFromGufi 

AddColumns(  
 GroupBy(
         tbl_Project_Updates,MeetingID
  ),"mdate",LookUp(tbl_Meetings,ID=MeetingID).MeetingDate
)

Hi @Drrickryp,

 

Thank you a lot, this was a great help. Your formula was a great basis to get to the final working code

 

The working code actually is:

 

-----------------------

Sort(

    Filter(

        AddColumns(

            GroupBy(

                tbl_Project_Updates,

                "MeetingID",

                "Rest"

            ),

            "mdate",

            LookUp(

                tbl_Meetings,

                ID = MeetingID

            ). MeetingDate

        ),

        !IsBlank(mdate)

    ),

    mdate,

    Descending

)

-----------------------

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,280)