cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gorilla_8
Super User
Super User

FILTER GALLERY BY MONTH AND YEAR

I have a gallery that comes from the CDS (Common Data Service)...

 

And she has several fields with dates ...

 

In the gif below shows the standard field ...

 

ERRO.gif

 

What I need...

 

Filter the gallery to only show items that match the month "06/2019"

 

 

19 REPLIES 19

Delegation warning!

 

ERRO.gif

Is mesfatura...  a DateColumn?

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Yes "mesfaturamento"

I did a test with the current approach as in the screenshot:

date.PNG

 

Option 2

Filter using two Datepickers, StartDatePicker and EndDatePicker. You can pick any of the date ranges from the two datepickers.

Then filter as:

Filter(Datasource, mesfaturamento>= StartDatePicker.SelectedDate &&

mesfaturamento <= EndDatePicker.SelectedDate))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Hi @eka24 

 

Thanks for the support and help!

 

On this last formula:

 

 

Filter (DataSource; "06/2019" in Text(DataColumn;"mm/yyyy"))

 

 

Worked better, but I got a warning delegation.... on "in".... on formula

 

 

And after I tried this formula...

 

Filter ('Pedido e faturamento'; mesfaturamento >=  Date(2019;06;01) && mesfaturamento < Date(2019;06;31))

 

No warning delegation...

 

But I think this one will not work pretty well...

Create a collection OnVisible:

ClearCollect(MyPedido, 'Pedido e faturamento')

 

Then filter:

Filter (MyPedido; "06/2019" in Text(mesfaturamento;"mm/yyyy"))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

I tried a collection, but he dont show nothing

Restart the App. If it doesn't show give a screenshot of the formula you used

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

@eka24 

 

Thansk eka! Worked perfectly!

This brings in the entire collection so this is probably great unless you are dealing with thousands or millions of records, no? Is there a delegable way to do this? 

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (2,951)