Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nihhalmca
Specialist II
Specialist II

Display data conditionally in Table Box

Hi All,

How can i display data conditionally in Table box only. For example Dims are Year, Qtr and Month.

Condition should be Year =2016.

Thanks,

Nihhal.

15 Replies
zhadrakas
Specialist II
Specialist II

in Table Box you can use Conditional Show of the Table like:

If you want to Show columns via condition you have to use the table Chart object

Chanty4u
MVP
MVP

Hi

if(GetFieldSelections(Year)<>null())


or


if(GetFieldSelections(year)=2016)

marcus_sommer

Within a tablebox are no conditions possible (whereby a simply select of 2016 will be enough). But you could use a straight table for it which could be apply conditions.

Not very nice but possible would be you creates a flag on the year 2016 within your data and all other data for these flag are NULL - now you could include these flag-field into your table-box and enable for this field the hide NULL option within the tab presentation.

- Marcus

sunny_talwar

You can hide the whole text box object by using this condition

=SubStringCount(Concat(DISTINCT Year, '|'), 2016) = 1

Or you can show blank using this expression on the Main Tab

=If(SubStringCount(Concat(DISTINCT Year, '|'), 2016) = 1, YourExpression)

nihhalmca
Specialist II
Specialist II
Author

Can we write this in Table box. I think it is not possible.

PrashantSangle

Hi,

use straight table.

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 🙂
sunny_talwar

Not to the table box object. But you can do it to Pivot or Straight table

jonathandienst
Partner - Champion III
Partner - Champion III

Is there a particular reason you wish to use a table box, rather than the more suitable straight table?

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
santiago_respane
Specialist
Specialist

If i where you i would do the following:

-Use straight table instead of table box

-Add all the fields you want to display as dimensions

-Add one expression with set analysis like this: =SUM({<Year={2016}> 1}

-In the presentation tab (straight table properties), hide the expression column created in the previous step

You will now have a table with your data filtered

Important: you can replace the hard-coded 2016 year in the expression with year(today(1)) or something like that to add some dynamism.

Please let me know if this helps.

Kind regards,