Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hide columns in table where fields are empty/null

Hello Community,

In a table box or chart I want to display the product number with around 30 fields of characteristics of each product.

ProductNoChar 1Char 2
Char 3Char 5
Char 6
Char 7Char 8Char  9
ABC2,31-99-77,2191-T
XYZ--------

My goal is to only show products where at least one of those characteristics is not null or empty and hide products with no characteristics at all.

So in above example how can I hide the row XYZ?

I'm guessing I need to prepare the data somehow but I don't have a clue yet.

Hope you have some ideas.

1 Solution

Accepted Solutions
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Maybe add an expression using RangeSum:

RangeSum(Char1,Char2,Char3,Char4,Char5,Char6,Char7,Char8,etc)

This will evaluate to zero in the chart then it'll be hidden by default. You can hide the expression in the Presentation tab so as not to clutter the chart.

I'd do this in the script if possible...

Hope this helps,

Jason

View solution in original post

9 Replies
senpradip007
Specialist III
Specialist III

In Dimensions tab check "Suppress When Value is Null" you will get your desire result.

CELAMBARASAN
Partner - Champion
Partner - Champion

Upload a Sample.

In charts it can be done. By using Suppress when value is null in the Dimension tab for the ProductNo dimension.

Not applicable
Author

By using Suppress when value is null all other columns are also gone.

For example if column8 is null but column9 is not then I won't see this row.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Maybe add an expression using RangeSum:

RangeSum(Char1,Char2,Char3,Char4,Char5,Char6,Char7,Char8,etc)

This will evaluate to zero in the chart then it'll be hidden by default. You can hide the expression in the Presentation tab so as not to clutter the chart.

I'd do this in the script if possible...

Hope this helps,

Jason

Not applicable
Author

Thanks Jason that works. However the chart became really slow (at least 3 seconds for scrolling) even after putting the statement in the load script. There are 1300 rows in total and only 130 are being displayed.

In the chart expression I put the field ExisitingChars and hide the column.

Is there a better way to make the chart become quicker again?

Not applicable
Author

so I ended up using:

if(RangeSum(Char1,Char2,Char3,Char4,Char5,Char6,Char7,Char8)) <> 0,1,0) AS ExisitingChars

in the load stmt.

This makes the chart responsive again.

chaper
Creator III
Creator III

Hi Jason,

How to hide columns when there is no value after makeing selection??

Untitled.jpg

I want to hide Char 2 Char5 char 8 as seen above.

Thanks

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Maybe use the conditional expression functionality. (Or conditional dimension if Char1 etc are dimensions). Use IsNull(Char2)=0

Hope this helps,

Jason

chaper
Creator III
Creator III

Thanks Jason