Why do i see the row data not the column data

This sample app shows how to automatically update summary information in Google Sheets:

You will need to study how Google Sheets formulas work.