Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi i have this set analisys to set my variable:
Set vFineMonthContrAlt = MonthEnd(MakeDate(GetFieldSelections(YEAR),Month(Date(Date#(GetFieldSelections(MONTH),'MM')))));
this take me the last day of my year month selected, for example if i select 2018 and 3 it will result: 31/03/2018
i wanna change it in this way:
if i select more months like 3,4,5 i want it result only the last day of the last month i selected, in this example so it must resutl: 30/05/2018
how can i set my variable for this?
thanks
ok I see the problem
as you declare it in a set instruction, Qlik tries to interpret the $( when you construct your variable
so you have to replace set by let and to disconnect the $ of the (
achieve this by doubling all single quotes
and .....
let vFineMonthContrAlt=
'MonthEnd(MakeDate(GetFieldSelections(ANNOOUT,'';'','''',''Contrattualizzato''),Month(Date(Date#(rangemax(' & '$' & '(=GetFieldSelections(MESEOUT,'','','''',''Contrattualizzato''))),''MM'')))))';
hello
maybe by using rangemax()
rangemax(GetFieldSelections(MONTH))
Maybe replace the GetFieldSelections() [which will only work fine for a single values selected anyway] with Max(FIELD):
Set vFineMonthContrAlt = MonthEnd(MakeDate(Max(YEAR),Max(MONTH)));
not work
i have this: =rangemax(GetFieldSelections(MESEOUT,';','','Contrattualizzato'))
the field is in alternative state "Contrattualizzato"
not work, i need to take the filed from my selection, i have list box where i select the months..
try rangemax($(=GetFieldSelections(MESEOUT,';','','Contrattualizzato')))
it say "error in expression"
i've just taken your expression
i have this: =rangemax(GetFieldSelections(MESEOUT,';','','Contrattualizzato'))
and enclosed it in $()
I thought it was correct .
no it not work, look i attach the example so you can try it
i need to find the rangemax from 2 months
and need to find the rangemin from 2 months
thanks
I tried that with your sample
=rangemax($(=GetFieldSelections(MESEOUT,',','','Contrattualizzato')))
and it works