How to reference a field in table calculation that has not been selected in data but is in the filter

I have this data:
Filters:
issue resolution contains fixed, resolved, unresolved
Data:
issues severity(pivot) major minor critical
project name Issue count Issue count Issue count

Here is what I need:
A table calculation for % of unresolved issues= (issues with resolution = unresolved) /(issues with resolution in (resolved, done,unresolved))

0 3 1,934
3 REPLIES 3

antho
Participant IV

Hello Garima,

To my knowledge, you can only base a table calculation on fields added to your data table so I think you should bring your “issue resolution” dimension somewhere in the data table before using a table calculation.

cf

Table calculations operate on the results from your query, as opposed to regular fields, which are part of the query itself. In other words, you’ll select a set of dimensions and measures and run your report as normal, then you can base table calculations on the data in that report.
https://docs.looker.com/exploring-data/using-table-calculations

Anthony

Dawid
Participant V

If you think about it, when you use a column in a WHERE clause, it doesn’t mean you’re selecting it, hence Looker follows the same principle.

I agree sometimes it would be useful to have the filters into the table calculation context without the need to pollute the data tab with each ingredient but Looker’s table calculations work after the data has been returned, hence you need to select it. Then the selection is directly tied with the data table so you have to use hide from visualisation but keep it in the context.

Thank you for your response. Would custom measure or custom dimension be a better approach ? Or maybe Lookml to calculate issues with resolution=unresolved?

Top Labels in this Space
Top Solution Authors