You can restrict which rows are included in a dataset by modifying the SQL query to
filter records.
SQL-defined datasets make it easy to limit dataset content to specific rows by adding
filtering conditions (for example, using a WHERE clause). This allows you
to control the subset of data available for analysis based on your requirements.
- Switch to Dataset Detail interface, and edit
SQL text window by applying the following statement:
select county, stname, ctyname, tot_pop, tot_male, tot_female from main.us_counties
where stname in ('Arizona','New Mexico', 'California','Nevada','Colorado','Utah')
- Click Save.
-
In the Refresh dataset table column information modal , click
Close.
- Switch back to the Data Model interface, click
Show Data, and notice that the dataset is limited to the states
specified in the SQL statement.
- If you were to test it by creating a simple map visual on the dataset, it would
look something like this: