So I have this code in a gallery and it filters everything correctly until I add records in different months. Instead of sorting by months and then by days inside each month, it filters ONLY by days and completely ignores the months, just like the attached image. What can I do to solve this?
SortByColumns(
Filter(Table1_2,
DateValue(Text(DATA, "[$-pt-PT]dd/mm/yyyy", "pt"), "fr") >= DateValue(Text(HOJE.SelectedDate, "[$-pt-PT]dd/mm/yyyy", "pt"), "fr") &&
Estado = "A" &&
//DateValue(Text(DATA, "[$-pt-PT]dd/mm/yyyy", "pt"), "fr") <= DateValue(Text(FUTURO.SelectedDate,"[$-pt-PT]dd/mm/yyyy", "pt"), "fr") &&
If(!IsBlank(dpSearchDate.SelectedDate), DateValue(Text(DATA,"[$-pt-PT]dd/mm/yyyy", "pt"), "fr") >= DateValue(Text(dpSearchDate.SelectedDate, "[$-pt-PT]dd/mm/yyyy", "pt"), "fr"), true)
),
"DATA",
If(SortDescending1,Descending,Ascending)
)