Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
brunod
Contributor
Contributor

Dates duplicated.

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?

Labels (1)
2 Replies
Lisa_P
Employee
Employee

stead of Floor, use the monthstart function

ali_hijazi
Partner - Master II
Partner - Master II

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

I can walk on water when it freezes