Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Show straight table based on selected $Field in listbox!

How can i show a straight table based on selected $Field name in listbox!

1 Solution

Accepted Solutions
JonnyPoole
Former Employee
Former Employee

ok. i didn't quite understand your grammar in our last post, but say you have $Field (the system field) in a list box to show all the field names in your data model.  Then the user selects one like 'Date'. To capture that possibility you can write an expression like:

Only($Field) = 'Date'

That will capture if 'Date' is the only value selected in $Field.  If you want to check if its one of many values selected , you can use the following as well

SubstringCount(  concat( distinct $Field,'-') , 'Date') > 0

This will create a '-' delimitted list of all the $Field values that are white or green and will check if 'Date' is in that list.

Is this closer to what you want ?

View solution in original post

6 Replies
JonnyPoole
Former Employee
Former Employee

If you want to show any object (straight table chart or other), go to the properties,  layout tab, show /condition and enter a true/false expression

In this case the following formula will check if a fieldname (any field including $field)  has one or more selected values:

getselectedcount( fieldname)>0

Not applicable
Author

Hi Jonathan,

This works if you select at least one value of your dimension!

I want if i select the dimension ($Field) name that be works!

Regards

JonnyPoole
Former Employee
Former Employee

ok. i didn't quite understand your grammar in our last post, but say you have $Field (the system field) in a list box to show all the field names in your data model.  Then the user selects one like 'Date'. To capture that possibility you can write an expression like:

Only($Field) = 'Date'

That will capture if 'Date' is the only value selected in $Field.  If you want to check if its one of many values selected , you can use the following as well

SubstringCount(  concat( distinct $Field,'-') , 'Date') > 0

This will create a '-' delimitted list of all the $Field values that are white or green and will check if 'Date' is in that list.

Is this closer to what you want ?

Anonymous
Not applicable
Author

Hi , if I understand you question correctly, you want to select the list of fields in a list box. so that only those fields will be shown in stright table.

Yes this can be achieved by creating in line table with single column contains the rows as your required filelds.

Create a staright table with your required fields and assign the condition to each dimension/fact using the below condition.

=SubStringCount(Concat(%Columns, '|'), 'MSRP')

%columns is your inline table column name and MSRP is your Field name that you want to enable based on the condition.

Condtion.JPG.jpg

BR,

Chinna Katiki

ashfaq_haseeb
Champion III
Champion III

Hi,

Check this

http://community.qlik.com/docs/DOC-5404

Regards

ASHFAQ

Not applicable
Author

Hi Jonathan,

Thanks. It works good!

Regards