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: 
didierodayo
Partner - Creator III
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
its_anandrjs

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

Ex:

Load

NUM(Month) as NumMonth

From source;

Expre:-

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

View solution in original post

4 Replies
Anil_Babu_Samineni

Try anyone of these

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

OR

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

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
its_anandrjs

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

Ex:

Load

NUM(Month) as NumMonth

From source;

Expre:-

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

didierodayo
Partner - Creator III
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

Anil_Babu_Samineni

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))'}

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)