A Data Studio search in Consonance has two parts – filters for selecting data (for example, that the product’s publishing status must be active or forthcoming), and an outcome (for example, viewing a list of works).

The filters that you use do not limit which outcome you can choose. You can add filters that only apply to prices, and then view a list of the prices, or you can switch to view a list of products, works, or contributors.

This is because all of these things are linked in your data. Prices apply to products, and products are part of a work, and contributors are linked to the work and the products.

So filtering on CAD or USD consumer prices with a value over 100.00 means that you can view the prices that meet these conditions, or the products that have those prices, or the works that have products that have those prices, or even contributors who are linked to products that have those prices.

This works in the other direction, also. You can use a filter on works, for example that it should be in a particular project stage, and view a list of products, prices, or contributors.

Filters

A search can have almost any number of filters, or none at all. If it has none then any outcome will be based on all of the metadata in the account – for example all of the products, or all of the contributors.

A search is not limited to filtering on only one type of record (such as prices or products), and much of its power and flexibility comes from being able to combine filters on many different record types.

For example, a search can have filters for forthcoming hardback products on Open Access works that are on a particular imprint and series, with a contributor who currently lives in Canada. As mentioned above, any outcome can be chosen with the search: you could view a list of products or prices or contributors.

There are a few different types of search filter.

Filters on metadata values

The most common type of filter is on a metadata value, such as the title of works, or the publication date of products.

As a simple example, a search for forthcoming hardback or paperback products needs two filters: one for the product’s publishing status (forthcoming), and one for the product’s form (hardback or paperback).

These are both defined with ONIX code lists, so they work in a similar way as selections from a list of values.

Other types of metadata element filters have different options available.

For example, date filters can be based on a fixed date, such as 1st January 1983, or a date relative to the date on which the search is run, such as in 3 days time, and a number of quick picks are available for the relative dates so you can choose Tomorrow instead of in 1 days time. A pair of search filters might be defined as Products - Publication date is on or after today and Products - Publication date is before 3 months from now, so you do not have to work out and choose new dates every time you run the search.

Text-based metadata elements, such as for work or product titles, have more possible filters, which include advanced pattern matching using regular expressions.

Some metadata filters are simple true/false conditions, such as whether ONIX exports are allowed for a product.

Filters on other searches

A more advanced type of search filter allows metadata to be identified based on whether it is, or is not, in the result of other searches.

This is quite advanced functionality, which might be best understood with an example.

Suppose a search is needed that includes only products that have a Canadian dollar price or a US dollar price. This needs a filter on price currency code:

If you view the prices list, you’ll see a list of all prices that are either CAD or USD.

If you view the products list, you’ll see a list of all products which have either a CAD or a USD price.

If you view the works list, you’ll see a list of all works with products having CAD or USD prices (it might have one product with only CAD prices, and one product with only USD prices, so this outcome really means list the works that connect to any CAD or USD price through its products).

If we use this search filter and choose to view the products list, we’re seeing all of the products that have a price which matches the filter – USD or CAD currency. We might also add filters on the price amount, or the price qualifier, to search for USD or CAD consumer prices that have an amount of under 10, or that the products must be ebooks. The number of filters and the type of object they apply to isn’t really relevant, only that we use some set of search filters that give us a set of products.

Now, let’s suppose that we want the opposite of this search – find all of the products that do not have either a CAD or USD price.

We might think that we can do this with a different search on prices: Currency - include none of - USD CAD

However, if we viewed the products list, we’d find that this is a search for prices that have a currency that is not CAD or USD, so we’re seeing products that have prices in any other currency at all. And those products might also be in the first list, if they have prices in AUD band USD, then they’ll appear in both lists.

But because we have a search that gives us exactly the products we do not want, we can now find all the others, with a new search that excludes the results of this one. We start by saving this search with a suitable name, such as CAD and USD prices, and start a new search that will refer to it:

This searches for all of the products that are not in the products list for the CAD and USD price search, so we have found all of the products that have neither a CAD price nor a USD price.

Filters on other searches can also be based on whether works appear in their list of results. One of the most useful way of using filters on work searches is to find works that have, or do not have, particular combinations of product forms.

For example, it is straightforward to find all of the works that have a hardback product by using a single search filter:

By saving this search with a useful name, and adding another search for paperback products, we can create a new report that searches for works that are in both of these searches:

Note that this search uses In all of, not In any of.

This can be extended to find all of the works that have a paperback product but not a hardback product:

This technique can be extended to find more complex situations, such as works with forthcoming ebooks and out of print hardbacks, or forthcoming paperbacks and ebooks and an active hardback, or paperbacks and no audiobooks, etc.

It’s worth noting that when filters on searches are used, the display that is used by the search you are referencing is irrelevant. It is the search filter that references the search that defines what result is being used from the search. Works - search means Limit the works in this report based on the works from the selected searches.

Four types of comparison are available on filters based on other searches: In any of, In all of, Not in any of, and Not in all of.

When you make a lot of use of search filters based on other searches you will likely find that you are creating quite a few searches, so it is important to give them useful names. Remember that search filters referencing them aren’t affected by which display they are using, so a useful name is probably going to only mention the filters of the report: Paperback products, Hardback products, or USD prices, not Works for paperback products, Prices for hardback products, or Series with USD prices.

Another tip is that in these examples we have described searches that use filters on works being in, or not being in, other searches. However, changing the display, and adding other filters, makes this even more powerful.

All docs about Article, Data Studio