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

Gallery to filter

Excel DataSource:    EmployeeCol

 

exc.png

 

 

My Screen:

I have onlyone dropdowns for "' Supplier Name""

*****I dont need dropdown for months and aslo i didnot add a month column in the Gallery.*****

 

            Filter gallery  with 3 conditions:

                 * depends on the dropdowns selected value

                 * All the time gallery wants to show the previous month data (current month -1)

                 *  filter If Reason for leave is = Y

 

Logic is ------> Gallery needs to filter depending on the values of the dropdowns with the respective month.  Month wants to be always the previous month by calculating the current month. So i need previous month data's for all the columns mentioned in the Gallery. Current month-1 ie: August-1= July. So every time when i come in to the App and click the dropdowns it want to  filter the gallery with dropdowns selected value and the datas should display the (Current month-1 ie: August-1= July) datas.

 

exact1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

Hi @ganesan_gowri ,

If Disposition Month is a Date column, try

If(
   IsBlank(Dropdown2_4.Selected.Result),
   EmployeeCol, 
   Filter(
      EmployeeCol,
      'Supplier Name'=Dropdown2_4.Selected.Result && 
      'Reason for Leave' = "Y" &&
       Month('Disposition Month') = Month(Today())-1
   )
)

if it is Text

If(
   IsBlank(Dropdown2_4.Selected.Result),
   EmployeeCol, 
   Filter(
      EmployeeCol,
      'Supplier Name'=Dropdown2_4.Selected.Result && 
      'Reason for Leave' = "Y" &&
      'Disposition Month' = 
      Text(
         DateAdd(
            Today(),
            -1,
            Months
         ),
         "mmm-yy"
      )
   )
)

 

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.

 

View solution in original post

2 REPLIES 2
Super User III
Super User III

Hi @ganesan_gowri ,

If Disposition Month is a Date column, try

If(
   IsBlank(Dropdown2_4.Selected.Result),
   EmployeeCol, 
   Filter(
      EmployeeCol,
      'Supplier Name'=Dropdown2_4.Selected.Result && 
      'Reason for Leave' = "Y" &&
       Month('Disposition Month') = Month(Today())-1
   )
)

if it is Text

If(
   IsBlank(Dropdown2_4.Selected.Result),
   EmployeeCol, 
   Filter(
      EmployeeCol,
      'Supplier Name'=Dropdown2_4.Selected.Result && 
      'Reason for Leave' = "Y" &&
      'Disposition Month' = 
      Text(
         DateAdd(
            Today(),
            -1,
            Months
         ),
         "mmm-yy"
      )
   )
)

 

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.

 

View solution in original post

Thanks a lot. Works fine.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (102,864)