Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Welcome to Qlik Community! Check out our new navigation! FIND OUT MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
sudhir0538
Creator
Creator

Month Year

Hi Experts !

In my db month field is maintained in numeric form i.e 1,2,3,--12. and year field is also numeric like 2018,2019 and so on.

I want to display month year as a dimension in a bar chart. Any Ideas of how to achieve this field inside QV.

Thanks.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

...
Date(MakeDate(YearField, MonthField), 'yyyy-MM') as Date,
Month(MakeDate(YearField, MonthField)) as Month,
YearField as Year,
...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

10 Replies
mostwanted123
Creator
Creator

Hi Sudhir,

Please find below code -

Month(MonthField) &'-'& YearField as Year-Month

Thanks

sudhir0538
Creator
Creator
Author

Hi @mostwanted123

Thanks for the reply but it's not working. Its combined and Only 3 months are displaying.

mostwanted123
Creator
Creator

Can you share the screenshots of the code written by you and output ?

Thanks

sudhir0538
Creator
Creator
Author

Hi Please find the attached.
sudhir0538
Creator
Creator
Author

 
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

You need to create Master Calendar or else you will get not consistent Year-Month dimension.

Use simply Year & Month as [Year Month]

jonathandienst
Partner - Champion III
Partner - Champion III

...
Date(MakeDate(YearField, MonthField), 'yyyy-MM') as Date,
Month(MakeDate(YearField, MonthField)) as Month,
YearField as Year,
...

 

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
sudhir0538
Creator
Creator
Author

Hi iJonty,

Thanks for sharing the work around. It really works. Here in the dimension i want to show the months in descending format for only last 12 months. like today is month of July 2019 so data will be of July 2018 to July 2019. July 18/2018 August 2018 Sep 2018 and after dec 2018 jan 2019 should appear but not july 2019.

Can you help me achieve this. screenshot attached 

jonathandienst
Partner - Champion III
Partner - Champion III

You are asking a new question now. I suggest that you mark this thread as answered (if you original question was answered) and open a new posting with the question. You can link back to this post if necessary.

I did not really understand what you were looking for in the new question and the screenshot did not help much. In the new post, please explain in more detail what you need and include a sample qvw (or a focussed screenshot) that illustrates the question more clearly.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein