Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Katherine
Contributor II
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
sunny_talwar

I think you misplaced the parenthesis.. try this

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

View solution in original post

4 Replies
sunny_talwar

I think you misplaced the parenthesis.. try this

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

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
PrashantSangle

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.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Katherine
Contributor II
Contributor II
Author

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