Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

how it works here

Hi all,

how this variable works

vNoOfMonthsDisplay  =12

vMonth=Num(AddMonths(Date(Max([Month Year])),-vNoOfMonthsDisplay))          ==this how works?

1 Solution

Accepted Solutions
sunny_talwar

It takes the Max(Month Year) and takes it back 12 months. Not exactly sure what you are not clear about...

View solution in original post

4 Replies
sunny_talwar

It takes the Max(Month Year) and takes it back 12 months. Not exactly sure what you are not clear about...

PrashantSangle

If you want to learn exact functionality of each function which use in your expression go to help menu

max()

addMonths()

date()

and Num()

Note : In your expression you can avoid Date()

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 🙂
shiveshsingh
Master
Master

=Num(AddMonths(Date(Max([Month Year])),-12))  


You are pulling max from the [Month Year] field and then going 12 months back, post this you are converting it to Num format.

Anonymous
Not applicable

Hi,


With my understand of expression, The code will roll-out for 12 months.


Ex: If you want to show case last 12 months trend from current month this code will helps.



Thanks,

Venkata Sreekanth