cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dhinesh28R
Post Prodigy
Post Prodigy

Filter wrong data to Galery

Hi,

i filtered my gallaery based on month, year and department by dropdown.

 

this is my list,

createdDateCreatornamecreatorMailRecievermailRecieverNameDepartment
03-03-2021Sureshsuresh@test.comDani@test.comDaniJava
03-03-2021DaniDani@test.comsuresh@test.comSuresh.net

 

from this list i filter my data into gallery based on Month and Department

SureshJava1

 

This is a wrong result am getting while am selcting .net.

 

Am using follwing Formula ,
FirstN(SortByColumns(AddColumns(GroupBy(Filter(List,Month(CreatedDate) = Dropdown3_1.Selected.ID, Year(CreatedDate) =Dropdown6_1.Selected.ID && Department= Dropdown1.Selected.Value),"Creatorname","creatorMail","Details"),"Count",CountRows(Details)),"Count",Descending),5)

am using the above fomula for filtering data into my gallery

 

Is display wrong result instead of .net it showing java.

 

Is anything wrong in my formaul?

 

Thanks,

Dhinesh

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@Dhinesh28R 

Your formula is essentially fine.  I would suggest the following just to boost performance a little:

SortByColumns(
    FirstN(
        AddColumns(
            GroupBy(
                Filter(List,
                    Month(CreatedDate) = Dropdown3_1.Selected.ID &&
                    Year(CreatedDate)= Dropdown6_1.Selected.ID && 
                    Department = Dropdown1.Selected.Value
                ),
                "Creatorname", "creatorMail", "Details"
            ),
            "Count", CountRows(Details)
        ), 
        5
    ),
    "Count", Descending
)

 

As for the wrong department, this is going to hinge on the Dropdown1 selection.  I would look over the items property of your dropdown and make sure you are filtering on the proper column of that selected item from the dropdown.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

4 REPLIES 4
RandyHayes
Super User III
Super User III

@Dhinesh28R 

Your formula is essentially fine.  I would suggest the following just to boost performance a little:

SortByColumns(
    FirstN(
        AddColumns(
            GroupBy(
                Filter(List,
                    Month(CreatedDate) = Dropdown3_1.Selected.ID &&
                    Year(CreatedDate)= Dropdown6_1.Selected.ID && 
                    Department = Dropdown1.Selected.Value
                ),
                "Creatorname", "creatorMail", "Details"
            ),
            "Count", CountRows(Details)
        ), 
        5
    ),
    "Count", Descending
)

 

As for the wrong department, this is going to hinge on the Dropdown1 selection.  I would look over the items property of your dropdown and make sure you are filtering on the proper column of that selected item from the dropdown.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Hi @RandyHayes ,

It's working fine man. but i want a Creatorname 's Department.

In list it stores RecieverName Department.

But actually i want a dropdown selction for Creator Department records stores in Gallery.

Is this Possible?

 

Thanks,

Dhinesh

RandyHayes
Super User III
Super User III

@Dhinesh28R 

So what is the relationship of creatorname and receivername to the department?

What is the items property of the dropdown?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

HI @RandyHayes,

I created column for CreatorDepartmnt.

Now its filtering correct Data man.

 

Thanks,

Dhinesh

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (3,563)