Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
danosoft
Specialist
Specialist

Change type of selection

Hi i have this problem, i have a variable like this:

Let vFineMonthContrAltAnnoTempoMinMonth = 'MonthEnd(MakeDate(GetFieldSelections(ANNOTEMPO),Month(Date(Date#(rangemin(' & '$' & '(=GetFieldSelections(MESETEMPO))),''MM'')))))';

this variabile have for value the last day of the "min" month i choose; for example from my selection MESETEMPO i choose 1,2,3

it will be 31/01/2018

is all ok till i choose 6 months (mesetempo = 1,2,3,4,5,6)

but if i choose 7 months i see mesetempo will be NOT 8,9,10,11,12

so my variable not do the correct value.

is possible to say to qlikview to make a right selection withouth this NOT

so if i choose 7 momnths in mesetempo, i want see 1,2,3,4,5,6,7

and so on

?

thanks

1 Solution

Accepted Solutions
marcus_sommer

You put the 12 within the fourth parameter which is for state-name and the second-parameter for the delimiter isn't a comma. Try it instead with:

GetFieldSelections(MESETEMPO, ',',12)

- Marcus

View solution in original post

6 Replies
m_woolf
Master II
Master II

You need to add a max_values argument to the GetFieldSelections function and set it to at least 12.

From QV Help:

Syntax:

GetFieldSelections ( field_name [, value_sep [, max_values]])

Return data type: string

Arguments:

ArgumentsDescription
field_nameThe field containing the range of data to be measured.
value_sepThe separator to be put between field values. The default is ', '.
max_values

The maximum number of field values to be individually listed. When a larger number of values is selected, the format 'x of y values' will be used instead. The default is 6.

danosoft
Specialist
Specialist
Author

But the problem isn't in the set analisys, the function is right work, the problem is when i choose more than 7 values in my list, when i choose more than 7 values QlikView  write in "current selections": MESETEMPO = NOT 8,9,10,11,12

but i need : MESETEMPO: 1,2,3,4,5,6,7

is possible to say to qlikview to make a right selection withouth this NOT?

thanks

marcus_sommer

Like mwoolf hinted you need to specify the second/third parameter of the getfieldselections(), too to be able to change this behaviour. Also you could change the used default-number within the user-properties, see: Re: Current Selection Box in Access Point only shows 6 Values.

- Marcus

danosoft
Specialist
Specialist
Author

ok thanks, i changed the used defautl-number, and now is ok i see the current selection: 1,2,3,4,5,6,7...,12

but i see my set analisys not work correctly:

'MonthEnd(MakeDate(GetFieldSelections(ANNOTEMPO),Month(Date(Date#(rangemin(' & '$' & '(=GetFieldSelections(MESETEMPO))),''MM'')))))';

it work good till 6 values choose, but after the 7th it not work...

danosoft
Specialist
Specialist
Author

becouse if i use: GetFieldSelections(MESETEMPO,",",12)

in my set analisys it NOT work

marcus_sommer

You put the 12 within the fourth parameter which is for state-name and the second-parameter for the delimiter isn't a comma. Try it instead with:

GetFieldSelections(MESETEMPO, ',',12)

- Marcus