Announcements
You can succeed best and quickest by helping others to succeed. Join the conversation.
cancel
Showing results for
Did you mean:
Partner - Creator III

## Max calendar or current selection Month

Hello,

I would like to add  the max month to a set analysis e.g. Sum({<??>}Sales). By default the max(Month) is the current calendar month e.g.October

otherwise Month Selections are made then it is the max(Month)of the selection. The Month Field is in this format.

Jan

Feb

Mar

Apr

May

Jun

Jul

Aug

Sep

Oct

Nov

Dec

Thanks

1 Solution

Accepted Solutions
MVP

In your data model add new field where you have month field create Num Month field

Ex:

NUM(Month) as NumMonth

From source;

Expre:-

Sum({\$<NumMonth = {"\$(=Max(NumMonth))"},Year={"\$(=Max(Year))"}>} Val)

4 Replies

Try anyone of these

Sum({<Month = {'\$(=Max(Month))'}>} Sales)

OR

Sum({<Month = {'\$(=Month(Today()))'}>} Sales)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP

In your data model add new field where you have month field create Num Month field

Ex:

NUM(Month) as NumMonth

From source;

Expre:-

Sum({\$<NumMonth = {"\$(=Max(NumMonth))"},Year={"\$(=Max(Year))"}>} Val)

Partner - Creator III
Author

HI Anil,

That is what I have been having issue with.

Month(Today()) returns October  when selections are made the value is then zero.

Max(Month)  returns the maximum of whatever is selected Which means Dec can be selected because my data has months up to Dec. But I would like the Maximum month to be the current calendar month or below.

thanks

True, Even we need to degrade again using Maximum year because qlikview can associate default when filter on month. Now, You can try using Year={'\$(=Max(Year))'}

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Community Browser