To show all rows in a TableBox or Straight Table, you must have some underlying unique value column you can use as a Dimension in the table. So toggling between showing all rows and consolidating duplicates is a matter of toggling the inclusion of the unique column on/off.
Take a look at this sample for an example:
Qlikview Cookbook: Tutorial - About Column Visibility http://qlikviewcookbook.com/recipes/download-info/tutorial-about-column-visibility/
Specifically, the Pivot table on the "Conditional (Dynamic) Columns" sheet where the unique OrderId is toggled on and off.