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
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)
Try anyone of these
Sum({<Month = {'$(=Max(Month))'}>} Sales)
OR
Sum({<Month = {'$(=Month(Today()))'}>} Sales)
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)
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))'}