Brian,
Using a render variable on a column is an inefficient way to handle this situation--regardless of the value of the prompt, your query returns 4 years of data, then suppresses display of half of the results.
Instead, use the query filter to exclude and include the years you want. The report won't display a column for which there is no data. I also agree with the recommendation to use a string variable rather than a boolean; that will make your report more flexible, down the road. You'll be able to craft the query filter to derive the two years to report out of an infinite range of years, rather than making it an either/or choice of two of four years. In fact, in this kind of situation, I'd likely make my prompt a multi-select, and offer the user a checklist of years, and by referencing the prompt value(s) in my query filter, select (and display) only the years desired, e.g. [myDataSource].[year] IN (?myYearPrompt?).
You'll need to adjust the technique a little depending on whether your DB is storing your [year] values (or whether you derive the year) as string or numeric values.
Good luck.
------------------------------
Michael Walter
Business Analyst
TX HHSC
Austin
------------------------------
Original Message:
Sent: Fri August 13, 2021 06:56 AM
From: Brian McGowan
Subject: Requirement to hide particular columns of a list report based on a prompt value.
Cognos Analytics 11.1.7
If the prompt is set to year 202021 then I wish to hide list columns relating to 201920 and 201819. This I can do successfully using boolean variables and the conditional state.
When I select the prompt value of the previous year (201920) I wish to display the 201920 & 202021 list columns but hide the 201819 related list columns.
When I select the prompt value of 201819 then I wish to display 201819 & 201920 & 202021 list columns
However I do not appear to be able to achieve this using boolean variables and the condition state as each column in the list only appears to be able to hold 1 Style variable and
overwrites when another style variable is applied
The image below may help clarify the requirement.

Any advice how this can be achieved.
Thanks in advance
Brian
Telephone +44 28 7012 4598
Email - b.mcgowan@ulster.ac.uk
This email and any attachments are confidential and intended solely for the use of the addressee and may contain information which is covered by legal, professional or other privilege. If you have received this email in error please notify the system manager at postmaster@ulster.ac.uk and delete this email immediately. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Ulster University.
The University's computer systems may be monitored and communications carried out on them may be recorded to secure the effective operation of the system and for other lawful purposes. Ulster University does not guarantee that this email or any attachments are free from viruses or 100% secure. Unless expressly stated in the body of a separate attachment, the text of email is not intended to form a binding contract. Correspondence to and from the University may be subject to requests for disclosure by 3rd parties under relevant legislation.
The Ulster University was founded by Royal Charter in 1984 and is registered with company number RC000726 and VAT registered number GB672390524.The primary contact address for Ulster University in Northern Ireland is Cromore Road, Coleraine, Co. Londonderry BT52 1SA
#CognosAnalyticswithWatson