Hi,
i filtered my gallaery based on month, year and department by dropdown.
this is my list,
createdDate | Creatorname | creatorMail | Recievermail | RecieverName | Department |
03-03-2021 | Suresh | suresh@test.com | Dani@test.com | Dani | Java |
03-03-2021 | Dani | Dani@test.com | suresh@test.com | Suresh | .net |
from this list i filter my data into gallery based on Month and Department
Suresh | Java | 1 |
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
Solved! Go to Solution.
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.
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.
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
So what is the relationship of creatorname and receivername to the department?
What is the items property of the dropdown?
HI @RandyHayes,
I created column for CreatorDepartmnt.
Now its filtering correct Data man.
Thanks,
Dhinesh
User | Count |
---|---|
255 | |
106 | |
85 | |
51 | |
43 |