Display TAG VALUES based on another key field using filter in Flux2.0

I want to display values of one tag field based on the selection of another tag key field.

I tried the following way but still no result.
from(bucket: “Configuration”)
|> range(start: -9223372036854775806)
|> filter(fn: (r) => contains(value: r[“Drive”], set: ${DriveName}))
|> keyValues(keyColumns: [“Stackercrane_ID”])
|> group()

I get the value of the DriveNames using following query
import “influxdata/influxdb/schema”

bucket: “Configuration”,
tag: “DriveName”,
measurement: “DriveConfig”,)

But I need to display the Stackercrane Names based on the DriveName.

Hi @Aritra666B yield statements are helpful as a debug tool.

For example
line 3.5 |> yield (name: "before keyValues")
line 4.5 |> yield (name: "after keyValues")

Inspect the resulting data at each step to isolate the problem.

Good luck!