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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
khaycock
Creator
Creator

Basic IF statement

Hi,

I'm not sure on the best way to do this, whether it be a calculation condition or not..

I have a table box that I only want to be displayed when 'ResponseFlag = No'

I thought it would just be a basic IF statement like this: IF(ResponseFlag = 'No', 1,0) but doesn't work.

Any ideas?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

The Show or Calculation condition will affect the complete chart, it is not evaluated per row.

You can use a straight table or pivot table chart with calculated dimensions or set analysis to filter the rows.

For example, try to create a straight table chart with all fields from the table box used as dimensions, then a single expression

=Count({<ResponseFlag = {No}>} ResponseFlag)

You can hide the expression column on presentation tab if you want.

View solution in original post

5 Replies
Anonymous
Not applicable

goto layout and there show conditional and just define

ResponseFlag = 'No'

swuehl
MVP
MVP

If you are using this in a calculation condition, it will be evaluated in global context, i.e. it will only return an unambiguous result if all records show the same value for ResponseFlag.

In general, you need to consider using aggregation functions, though I am not sure how this should look like in your case:

Use Aggregation Functions!

Anonymous
Not applicable

Go in

Properties > Layout. Activate the conditional option and then put your statement there.

khaycock
Creator
Creator
Author

I want the table to show regardless but just want fields to be displayed in it that have ResponseFlag ='No'.

When I put that into layout conditional it gets rid of the whole table?

swuehl
MVP
MVP

The Show or Calculation condition will affect the complete chart, it is not evaluated per row.

You can use a straight table or pivot table chart with calculated dimensions or set analysis to filter the rows.

For example, try to create a straight table chart with all fields from the table box used as dimensions, then a single expression

=Count({<ResponseFlag = {No}>} ResponseFlag)

You can hide the expression column on presentation tab if you want.