InfluxDB Flux query how to get distinct values from query

I have written the following Flux query in Grafana, I get three results. We are using k6 for performance testing and are trying to fetch all of the unique scenarios:

Query:
from(bucket: v.defaultBucket)
|> range(start: -168h)
|> filter(fn: (r) => r[“_measurement”] == “http_reqs” and r._field == “value”)
|> keep(columns: [“scenario”])
|> columns(column: “labels”)
|> distinct()
|> map(fn: (r) => ({ r with scenario: r.scenario }))

I would like to receive “persons_end_user”, “main_flow” and “bank_accounts_end_user” at the end so that I can store those values in a grafana variable. But when I input the same query in the Variable section I get “Null” result. How should I alter the query for it to get the three values from the above picture.

When I enter the same query in the variables section:

@M_A,
I’m confused. It looks lie you’re not getting a value from the first screen shot so null makes sense to me.