Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to limit the number of rows displayed in my table

Hello,

I'm new to Qlikview so already my appologies if I'm asking noob questions.

I have a database which contains development requests. In the request the builder is entered by the user. This field can contain multiple values (free text).

Now I want to create a table with only the values for a certain builder.

Example:

builderrequest number
Tom1
tom, peter2
Tom Lismont, Peter, John3
John, tom4

In my table only the rows for Peter should be displayed. Anyone can help?

1 Solution

Accepted Solutions
Not applicable
Author

You already have a straight table.  To hide all the non Peter lines, select your calculated dimension on the Dimension tab and halfway down the right side select 'Suppress When Value Is Null'.  This will filter out the non Peter records.

If you only want to see Peter (rather than for instance Ed van Daal; Peter Pesch) change your calculated dimension to read:

=if(index(lower(Builder),'Peter')>0,'Peter')

View solution in original post

6 Replies
Not applicable
Author

One method would be to create a straight table and use a calculated dimension with the following expression:

=If(index(lower(builder), 'peter')> 0, builder)

This searches for any occurrence of Peter (case insensitive).

Of course the drawback is that your are restricted to searching for 'Peter' unless you change the code.

Not applicable
Author

Ok and now for the super noob question: how to create a straight table? In my table I tried creating adding a calculated dimension with your code but the result is that I still get all the records. Where Peter is the Builder, the name is showed and in all the other cases there is a '-'.

Not applicable
Author

I uploaded the qvw so you can have a look what I'm talking about.

Not applicable
Author

You already have a straight table.  To hide all the non Peter lines, select your calculated dimension on the Dimension tab and halfway down the right side select 'Suppress When Value Is Null'.  This will filter out the non Peter records.

If you only want to see Peter (rather than for instance Ed van Daal; Peter Pesch) change your calculated dimension to read:

=if(index(lower(Builder),'Peter')>0,'Peter')

Not applicable
Author

Also once you have created your calculated dimension and filtered by it, you can choose to hide it by going to the Presentation tab, selecting your column and changing the status from Show Column to Hide Column.

Not applicable
Author

Can I mention that it's poor database design the way the origional table is setup and you will run into more and more problems down the road.  Someone can enter Pete, Peter, Petey all meaning the same thing, it gets worse if they start entering (butchering) last names.  I am speaking from experience free form text fields are evil.

If you have the ability to do something about the source try to.