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: 
cliff_clayman
Creator II
Creator II

Can I limit the data in a Table Box using a field value?

I have a Table Box that I want to limit the data for only data from 2018.  Is that possible to do?

1 Solution

Accepted Solutions
sunny_talwar

‌Then do as Ruben suggested... create a new year field

If(Year = 2018, Year) as Year_New

and then instead of adding Year, add Year_New as your field and select the omit option on the presentation tab. Oh and ya please remember to label Year_New as Year because I am sure you would not like to see Year_New as a column label 

View solution in original post

7 Replies
rubenmarin

I think the only option is to select 2018, as a workaround it can be in another altern state, but selections will be done in this state.

Another option is using a simple table showing the fields as dimensions with an expression that filters the data with set analysis, or use the expression that filters the data to show some existing field as expression instead of showing as dimension.

cliff_clayman
Creator II
Creator II
Author

Why can't this be done using a Table Box?  Seems like this should be something that should be easily done.

vishsaggi
Champion III
Champion III

Table box is only used to show some static data values. You cannot do much with this object. May be use Straight table. Can you explain a little more on whats your expected output. Can you share some sample data?

sunny_talwar

One option is to create a new field in the script like this

If(Year = 2018, 1) as FlagYear

Now add FlagYear as one of the fields in your table box and then go to the presentation tab and check 'Omit Rows Where Field is NULL' for the FlagYear dimension.

Make sure to do this for FlagYear to make it work...

rubenmarin

TableBox doesn't allows for calculated expression, another workaround can be adding a field that copies the year value but with only values in 2018 (others as null) and in presentation tab check the option to omit rows with null values.

cliff_clayman
Creator II
Creator II
Author

Can I somehow keep from showing the FlagYear column in the table box?

sunny_talwar

‌Then do as Ruben suggested... create a new year field

If(Year = 2018, Year) as Year_New

and then instead of adding Year, add Year_New as your field and select the omit option on the presentation tab. Oh and ya please remember to label Year_New as Year because I am sure you would not like to see Year_New as a column label