You can do some simple postprocessing by Grafana transformations.
For example, you have the following data obtained from your datasource:
Using Filter by value transformation it is possible to filter data by variable value:
As of now, to be able to use dashboard variables in this transformation, it is necessary to enable transformationsVariableSupport feature toggle:
[feature_toggles]
enable = transformationsVariableSupport