Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
maasool
Contributor III
Contributor III

Group Date to Month-Year without duplicates

Hello dear Qlik Community,

I have dates, which I would like to convert and group on month-year basis, so I could use it as a filter in QS app.

When I do conversion Date(POSTING_DATE,'MM-YYYY') then as a result, I get duplicate results. For example,
for each date, which is in January 2019, I get '01-2019'. However, I would like to have only one '01-2019' per
all the dates, which are in January 2019. How to achieve this?

Thanks
maasool

1 Solution

Accepted Solutions
martinpohl
Partner - Master
Partner - Master

another solution is

date(monthstart(POSTING_DATE),'MM-YYYY') 

Your solution is showing only month and year but datas are stored with day also.

Regards

View solution in original post

4 Replies
Anil_Babu_Samineni

Perhaps this

Date(Floor(POSTING_DATE),'MM-YYYY')

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
martinpohl
Partner - Master
Partner - Master

another solution is

date(monthstart(POSTING_DATE),'MM-YYYY') 

Your solution is showing only month and year but datas are stored with day also.

Regards

saar_lorena
Contributor III
Contributor III

If your data is duplicating, the issue is not with the period...

Can you upload your file here?

 

Thanks 😃

maasool
Contributor III
Contributor III
Author

Thanks for thinking along everyone! Martinpohl solution did the work for me.