Control/Update graph with non-key field

This must be straightforward, but for the life of me I haven’t found the answer.

My dataset involves store sales of different products. I want to show graphs of sales for different types of products in different stores.

Stores are identified by a store id, and have a store name.

Products are identified by a product id, and have product names.

I get the graphs that I want, but the controls show the store ids and the product ids, because that is the parameter that is used in the joins everywhere to retrieve the relevant data.

However, these controls are not useful to my client, because there are hundreds of stores and thousands of products. They should instead be able to see in the control dropdowns, the store names and the product names.

My problem is then: how do I show the names in the controls, but then have the graphs update by the ids? Some sort of calculation that says if control selects store ABC, then go lookup what id that is then send that to the dataset to update the graph?

Something like a lookup or vlookup calculated field I guess.

Appreciate any help, cheers!

Similar to this question but that one doesn’t have an answer :frowning:

Welp. The only solution I found in my timeframe was to modify the original query so that it used the store name (instead of id) as parameter. Same for products.

It’s not ideal, nor efficient, but for now it’ll do.

Where do you have product ID and product name mapping available?

They’re both fields in the main product table, but the name is not a primary key field.

I also tried creating a separate dataset that just had the product id and product name, but that didn’t help much with the control, because I couldn’t find a way to tell the graph, hey when this name is selected use the corresponding id for updating your parameter.

I tried a calculated field, but there’s no lookup or vlookup function there either.

If you modify the dataset to add a new dataset(id to name mapping) and configure left join, it will work the same as lookup only.