Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

hide select field when is empty

Hi,

Is there a QV function to see if a select field/dimension is empty. I want to hide the select field if there is no dimension value.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

What do you mean with 'empty'? No data values loaded? Then the fieldvaluecount('MyFieldHere') will be 0. You can use that as a conditional expression on the Layout tab for a listbox or for the conditional expression on the Dimensions tab for a dimension in a chart.


talk is cheap, supply exceeds demand

View solution in original post

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

there is a check box in the dimension page: "Suppress when value is null", try to check and let me know

PrashantSangle

Hi,

try Isnull(FieldName)

or len(trim(fieldName))=0

If you want hide empty/Null field from chart then you can click on supress when value is null from Dimesion tab.

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

I don't see this attribute

it is an list box object I want to hide if there are no values

alexandros17
Partner - Champion III
Partner - Champion III

Ok, then write:

in the general tab, at the bottom of field name list there is an tem "Expression", select it and write

If(trim(myDimension)='', null(), myDimension)

Not applicable
Author

I want to hide/show a selection box if there are no values in it at all.

alexandros17
Partner - Champion III
Partner - Champion III

IN the layout tab there is a "show" section, in conditional write:

GetPossibleCount(myField) > 0

PrashantSangle

Hi

Write in expression with if()

like

if(len(trim(fieldName))>0,FieldName)

Or write this in Script

if(len(trim(fieldName))>0,FieldName) as New_fieldName,

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Gysbert_Wassenaar

What do you mean with 'empty'? No data values loaded? Then the fieldvaluecount('MyFieldHere') will be 0. You can use that as a conditional expression on the Layout tab for a listbox or for the conditional expression on the Dimensions tab for a dimension in a chart.


talk is cheap, supply exceeds demand
Not applicable
Author

thx works like a charm!