Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Count Month

Hi All,

I want to count all previous three year months

01-03-2011 from to till date how many months please help me

Thanks in Advance

Niranjan

12 Replies
MK_QSL
MVP
MVP

Dear Niru

You can try below....

=IF(Num(Month(Max(Date)))-Num(Month(Min(Date)))>=0,

  ((Num(Year(Max(Date)))-Num(Year(Min(Date))))*12)+Num(Month(Max(Date)))-Num(Month(Min(Date)))+1,

  (NUM(Year(Max(Date))-Num(Year(Min(Date)))-1)*12)+13-Num(Month(Min(Date)))+Num(Month(Max(Date))))

tresesco
MVP
MVP

Goto variable overview and change the definition of vStartNum : like :

dd.png

Anonymous
Not applicable

Niru,

Here is the formulae you can use to get the months.

(Year(Today(2))*12 + Month(Today(2))) - (Year(Date#('01-03-2011','DD-MM-YYYY'))*12 + Month(Date#('01-03-2011','DD-MM-YYYY')))