Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I do have a date, in the the format like 2011-11-19 00:00:00, used this function to narrow down to year-month:
Date(Floor(Date#(Trim(dat_calculo), 'YYYY-MM-DD hh:mm:ss')), 'YYYY-MM') as [CC Ano-Mês CalculoTRIM]
But the problem that it gives duplicates for the year months, for example 3 entries 2024-06, 5 entries like 2024-01, but they represent the same date space.
How to solve this to give unique Year-Month selections?
stead of Floor, use the monthstart function
that's because your date values contain time
use the below to remove or rest the time:
monthname(daystart(your_date_field)) as your_date_field