Reports - Advanced Filtering in the Dynamic Cost Explorer
We have explained the basic queries you can use in the dynamic cost explorer on this page. Bu the filter feature can be quite powerful to get a more customized cost breakdown.
Regardless of the filter, the selection of values can be "bind" i.e. your reports are always tracking all parameters values, including new ones that may appear over time with the use of the "selection binding" button (1):
You can use the "I" (OR) operator, here for example to select cost allocation units where the environment tag values contains dev or prod :
Support for regular expressions
The detailed cost explorer is using standard regular expression to filter values (RegExp) :
. for any character
* for 0 or more times
^ for beginning of line
$ for end of line
prod Any value that contains ‘prod’
.*prod.* Same as above
^prod.* Any value that starts with ‘prod’
.*prod$ Any value that ends with ‘prod’
^(?!NonProd.*).* Anything not starting with ‘NonProd’
values ending with "db"
Excluding values from reports
To exclude values you will need to add the ||exclude[<regexp>] after your query.
prod||exclude[DB] Anything that contains ‘prod’ but nothing containing ‘DB’
(Prod|Dev)||exclude[^DB] Anything that has ‘Prod’ or ‘Dev’ but nothing starting with DB
the ||top(x) operator will allow you to get the top x in cost or usage values
||top(15)||exclude[Others] the top 15 excluding the values "Others" which are untagged resources
||top(10; total; "The remaining") Will give you the TOP 10 and will group the others values in a group called "The remaining"
Named group of values
You can give a name to a group of values matching a regular expression: ##<group-name>§§<regexp>##
##Production§§(.*prod.*)## Group together all the entries containing ‘prod’ into ‘Production’
##Production / $2§§(.*prod.*) / (.*)## Group together all the entries containing ‘prod / *’ into ‘Production / $2’ where $2 is the second group extracted from the values which are matched. Interesting to use when Production is written in different ways in the tags and you want to group all of them together under the unique ’Production’ label. In our example below the second group are the components:
##Production§§(.*prod.*)##||##Development§§(.*dev.*)##||##Test§§(.*test.*)## Group together all the entries containing ‘prod’ into ‘Production’ and entries containing "dev" into a Development group and Test for test entries