Filtering by Category3:07 with Alena Holligan
We're going to add a second filter, to filter by category. We're also going to make it easier to add more filters as we go. Changing reports to fit the current needs of the company is an important tool for managing data.
switch() statements are similar to a series of IF statements on the same expression. In many occasions, you may want to compare the same variable (or expression) with many different values, and execute a different piece of code depending on which value it equals to. This is exactly what the switch statement is for.
Reminder: Leaving PARAM_INT will remove all non integers, thereby looking for a blank category instead of the category selected.
You need to sign up for Treehouse in order to download course files.Sign up