Way to hide group of column in a table

I read that is not possible to hide/show column in a table by some command. Is there a way with Calculated filed to assign a value of a parameter and use it like column name in a table value ?

Yes you can change the column names based off of a parameter.

image