Of course, in the item's visibility property, there is an option "Show or hide based on an expression", you can add an expression to control the item's visibility.
For more details, you can refer to this link.
I know I can toggle column's visibility based on another item. That means the other item would have a plus sign for a user to click on. What I want is to use the same toggle mechanism to collapse a column but without user interaction. Another words, to have columns collapsed automatically. Is it possible to base toggle on an expression?