Using an “If Then Else” Statement In a Filter

Use an If-Then-Else statement in a filter to refine Cognos report results with conditional logic for more accurate and relevant data output.

Another great Cognos Tech Tip from one of our expert consultants. Thanks Trevor for providing this one!

You can use if then else statements in a filter as long as you have a static answer (or set of answers) to complete the filter logic, rather than using column names like you would in a calculation.

The filter in the screenshot is for a report that will show students with less than 80 minutes scheduled each day. The prompt will default to 80 unless they enter their own value in the text box prompt on the page. This is also pretty helpful because they don’t need a prompt page, they run the report at 80 and then have the option to change it if they need to. Without the if then else, they would have to answer a prompt to complete the filter logic before running the report.

The filter was set to optional, with a default value of 80 to show in the box.

All Posts

Alteryx
Subscribe to our newsletter

Sign up for the very best tutorials and the latest news.

* indicates required

We care about your data in our privacy policy.

Related blog posts

Business Intelligence & Analytics, Cognos BI & Analytics, Cognos Tips & Tricks
The Differences between a Cognos Dashboard and an Active Report
Compare Cognos Dashboards vs Active Reports to understand key differences in capabilities, use cases, and best scenarios for each reporting style.
Business Intelligence & Analytics, Cognos BI & Analytics, Cognos Tips & Tricks, Cognos Training
Auditing for Accurate Cognos Reports
All Cognos reports need to be checked to ensure the report produces accurate data. Follow these tips to eliminate any potential errors in your report.
Cognos BI & Analytics, Cognos Tips & Tricks, Cognos Training
Using IBM Cognos for Microsoft Office
Learn how IBM Cognos for Microsoft Office connects Cognos Analytics data to Excel, Word, and PowerPoint for dynamic, accurate reporting.

Contact Us

Interested in learning more? Contact info@capitalizeconsulting.com.