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

nested gallery with distinct error

Hey, 

 

I have a nested gallery, first gallery as a project name (Table: Projet, Column: Name) and the nested gallery must have only the info egual to the project:

Code in the nested Gallery: 

ForAll(
    Distinct(
        Filter(
            'Test-Row-calcul',
            ThisItem.Name = Projet_Name && Dropdown1.Selected.Value = Text(Date_modifier, "mmmm")
        ),
        Date_modifier
    ),
    LookUp(
        'Test-Row-calcul',
        Date_modifier = Result 
    )
)

 

But as you can see the project name not match:

loopingmurdock_0-1661948663050.png

Is there a raison?

Thanks for your help.

1 ACCEPTED SOLUTION

Accepted Solutions
loopingmurdock
Helper IV
Helper IV

ForAll(
    Distinct(

            'Test-Row-calcul',
            
        Date_modifier
    ),
    LookUp(
        'Test-Row-calcul',
        Date_modifier = Result && ThisItem.Name = Projet_Name
    )
)

View solution in original post

6 REPLIES 6
Drrickryp
Super User
Super User

@loopingmurdock 

Check out the documentation for the GroupBy() function. It is more appropriate for your purpose than Distinct.

it doesnt seem to work i keep getting error, "does not exist"

GroupBy(
Filter(
'Test-Row-calcul',
ThisItem.Name = Projet_Name), ThisItem.Name, "Test")

I will try to explain with more info.

I have one gallery(GAL) with the project name only, and a nested gallery(GAL2) with must only have the info from the item present in GAL1, (ThisItem.Name), the nested gallery(GAL2) must be filtered with only the info and distinct date.

this works but date are not distinct: 

Filter(
            'Test-Row-calcul',
            ThisItem.Name = Projet_Name
        )

 

I will try and find an other solution.

loopingmurdock
Helper IV
Helper IV

ForAll(
    Distinct(

            'Test-Row-calcul',
            
        Date_modifier
    ),
    LookUp(
        'Test-Row-calcul',
        Date_modifier = Result && ThisItem.Name = Projet_Name
    )
)

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,740)