cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LyonsBI_BRL
Resolver I
Resolver I

Dropdown filter by Date selection

I'm looking at wanting to filter my Dropdown selection by a given Date. Right now my Items on my dropdown is as follows 

SortByColumns(Distinct('Scoring'.'Fire Team','Fire Team'), "Result")

LyonsBI_BRL_0-1635082284028.png

However what I'd like to do is that, if I select a certain date, (Example 9/14/2021) it only shows the selected teams from the drop down (i.e. If it's 9/14/2021 it only shows Alpha, Bravo, Charlie, instead of all the rest)

 

I'm assuming there's a way to do this though I just can't wrap it around my head what it'd look like.

 

Would the gallery Items code need to be changed at all from what it currently is below?

SortByColumns(Filter('Scoring', 
    'Team' = 'Team Selection'.Selected.Result,
    Location = 'Location'.Selected.Result,
    DQ <> 'IS DQ'.Selected.Value,
    Date = 'Date of Event'.SelectedDate), "RSO",
    If(SortDescending1, Descending, Ascending))

 

Thanks!

3 REPLIES 3
WarrenBelz
Super User
Super User

Hi @LyonsBI_BRL ,

Apart from Date being a bad name for a field and the <> being not Delegable, it looks OK - you could also try the below if you want to get rid of the Delegation warning, but the top filter needs to have a result less then your Delegation limit

With(
   {
      wList:
      Filter(
         'Scoring', 
         'Team' = 'Team Selection'.Selected.Result &&
          Location = 'Location'.Selected.Result &&
          Date = 'Date of Event'.SelectedDate
      )
   },
   SortByColumns(
      Filter(
         wList,
         DQ <> 'IS DQ'.Selected.Value
      ),
      "RSO",
      If(
         SortDescending1, 
         Descending, 
         Ascending
      )
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

LyonsBI_BRL
Resolver I
Resolver I

@WarrenBelz 
Hey Warren thanks for the response! Not getting a delegation warning, though after applying this code to the Items part of the Gallery I'm still seeing everything on the drop down.

 

LyonsBI_BRL_0-1635116588966.png

 

Hi @LyonsBI_BRL ,

I am a little lost here - the code will filter the gallery according to the three drop-downs and the date picker. What do you mean by I'm still seeing everything on the drop down.

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,221)