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

Filter table object

hi,

I have a table with products in it. A product has a categorie.

I want to have table objects in 4 tabs with the following filters:

Tab1: all cat

Tab2: cat1

Tab3: cat2

Tab4: cat3

I can't find an option in properties to filter the table.

So how can i filter a table object ?

Kind regards,

ThijsJan

1 Solution

Accepted Solutions
Not applicable
Author

You can try this expression

=sum({$<Category={"Cat1"}>} 1)

and hide the column as suggested by swuehl

View solution in original post

7 Replies
swuehl
MVP
MVP

Hi ThijsJan,

so you got a table chart (pivot or straight table chart) with dimension product, correct?

For a table chart, you could use a calculated dimension (add calculated dimension in dimension tab of chart properties), like

=if( categorie = 'cat1', product)

You could create 4 table charts, 3 with calculated dimension like above (replacing cat1 with cat2, cat3), one with a plain dimension product (for all categories).

Then you have four tables, 3 of them filtered by category. You could then use a container object to include these 4 tables, having tabs to switch between the filtered objects.

Just one idea of how you could maybe achieve what you want,

Stefan

Not applicable
Author

Most probably for tabs 2-4 you should use expression with set analysis.

For example

Tab2:

=sum({$<Category={"Cat1"}>} Amount)


Set analysis expressions are very well described in QlikView help.

Not applicable
Author

Hi,

Thanks for the reply.

I don't have a table chart, I have a table object.

And when I try to do a table chart (pivot or straight) it seems I need an expression otherwise it doens't work. But i have nothing to sum or count.

swuehl
MVP
MVP

Just for now, you could add a plain

=product

as expression in a straight table, or

=1

, doesn't really matter because then you could hide the expression in a straight table (using presentation tab, upper left corner).

Not applicable
Author

You can try this expression

=sum({$<Category={"Cat1"}>} 1)

and hide the column as suggested by swuehl

Not applicable
Author

Hi,

Thanks it worked.

Kind regards,

ThijsJan

swuehl
MVP
MVP

That's good to hear!

Just to clarify, you would either need a calculated dimension on tables 2-4 or the set expression, not both at the same time.

Dmitry's solution should be better performing, though.

Have fun,

Stefan