Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Literal Month Number

Hi Guys

Please could you assist me with the following:

I have loaded a staffs start date and made end date to be September 2016.

What i would like is for the literal number count to be applied based on the staffs start date month.

For example:

Staff A , started in December 2015 and end date is September 2016.

I would like to display the counter as an expression as Start Month being 1 , second month being 2 and so on:

  Date Month      Counter

Dec-151
Jan-162
Feb-163
Mar-164
Apr-165
May-166
Jun-167
Jul-168
Aug-169
Sep-1610

Thanks Guys!

6 Replies
sunny_talwar

This you want from the script or directly in your front end chart? I think doing it in the script might be an easier option. Chart expression can get messy

marcus_sommer

Most common is to match the start- and end-dates with a calendar per IntervalMatch.

- Marcus

sunny_talwar

This blog by HIC have an example of how to this in the script:

Loops in the Script

maxgro
MVP
MVP

(year([Date#(DateMonth, 'MMM-YY')])*12 + Floor(Month([Date#(DateMonth, 'MMM-YY')]))  )

-

(year(min(TOTAL [Date#(DateMonth, 'MMM-YY')]))*12 + Floor(month(min(TOTAL [Date#(DateMonth, 'MMM-YY')])))  )

+

1

1.png

Not applicable
Author

Thanks Gents appreciate it, tried all your methods and it worked.

Appreciate it.