Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
help4qv123
Contributor

Field Names in variable

Hi friends

i need all the filtered list box values in textbox.

eg: I have an expression like.

if(assets='ABC',

Count ({$<[assets] = {'Assest1','Assest2','Assest3','Assest4'}, 

[group] = {'$(Valcoholoc1)'} >} DISTINCT TOTAL [Value] ))

here = Assest1, Assest2, Assests3 are the field names which are hard coded. in place of hardcode i want to replace it with variable...

assets is a column name in listbox. for example employee is a listbox, if i select A in another field the employee names will get filter in employee listbox(Table). So filtered field names should be placed in variable so that i can replace in the above expression,

I can use like =GetFieldSelections([assets],', ',2

But this wrks when we select multiple fields. i need the field names which are just filtered in listbox.

4 Replies
Not applicable

Re: Field Names in variable

HI

in your variable use something like

Concat(Distinct Chr(39) & [assets] & Chr(39), ',')

this will give you a concatenated list of possible values in your assets field like

'Value1','Value2','Value3' etc

hope that helps

Joe


help4qv123
Contributor

Re: Field Names in variable

Thank u. .It works.

help4qv123
Contributor

Re: Field Names in variable

can i place an exclude in this...

in my 1st value it shold exclude the dim value and calculate irrespective of that.

like my straight table displays assets dimension and its value.

dim             exp(value)

assets1     if(assets='asset1',Count ({$<[assets] = {'Assest2','Assest3'} >} DISTINCT  [Value] ))

assets2    if(assets='asset2',Count ({$<[assets] = {'Assest1','Assest3'} >} DISTINCT  [Value] ))

assets3    if(assets='asset3',Count ({$<[assets] = {'Assest1','Assest2',} >} DISTINCT  [Value] ))\

this is the sample example....

Not applicable

Re: Field Names in variable

Not sure I follow what you are trying to do, can you post up an example application

Community Browser