Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Katherine
New Contributor II

Month Year Duplicate date conversion problem

Hi, 

I'm trying to bucket incidents by MonthYear. 

LOAD
*
Month(IncidentDate) as Month,
Year(IncidentDate) as Year,
Date(IncidentDate,'MMM-YY') as MonthYear

 

However, when I do so using the above script it looks like it is converting each individual date into a MonthYear value, with lots of duplicates. You can see the issues pretty clearly in the attached chart. 

qlikview help1.JPG

Any suggestions? I tried to use MonthStart because I read somewhere that that would help eliminate the duplicates, but then the calculation didn't work at all (null values).

Date(MonthStart(IncidentDate,'MMM-YY')) as MonthYear

Labels (3)
1 Solution

Accepted Solutions

Re: Month Year Duplicate date conversion problem

I think you misplaced the parenthesis.. try this

Date(MonthStart(IncidentDate),'MMM-YY') as MonthYear

View solution in original post

4 Replies

Re: Month Year Duplicate date conversion problem

I think you misplaced the parenthesis.. try this

Date(MonthStart(IncidentDate),'MMM-YY') as MonthYear

View solution in original post

qliksus
Valued Contributor II

Re: Month Year Duplicate date conversion problem

Does it show the similar duplicate value if you take Month Year in a list box?? If Jan-19 is shown repeatedly means QV is treating it as different value instead of one

Re: Month Year Duplicate date conversion problem

try
1: Date(monthStart(IncidentDate),'MMM-YY')
2: Date(monthEnd(IncidentDate),'MMM-YY')
3: MonthName(IncidentDate)

Regards,
Great dreamer's dreams never fulfilled, they are always transcended.
Katherine
New Contributor II

Re: Month Year Duplicate date conversion problem

Oh the joy and pain of a single parenthesis - thank you, that fixed it!