I’m currently working on a dashboard where I need to analyse data by shop_id. The shop_id column in my dataset is of string datatype, which is necessary for enforcing Row-Level Security (RLS).
To perform analysis on shop_id, I’ve created a calculated field using parseInt({shop_id}) called shop_id_int to convert it to an integer. This integer field is then used to link a filter to a ShopID parameter, which in turn is linked to the original shop_id column. This setup allows the visuals based on shop_id_int to be filtered by the selected Shop ID.
While this workaround works, it raises a question:
Is there a way to directly filter these calculated field visuals using parameters linked to the original shop_id string column?
The reason I ask is that I want to avoid duplicating and converting the column if possible. Directly filtering by the string column would simplify the process and maintain consistency across the dashboards that use this dataset.
Any insights, suggestions, or best practices for handling this scenario would be greatly appreciated!
I am not sure why you ended up creating the shop_id_int calculated field. You could simply create a Parameter based on the original shop_id column and then filter the visuals on shop_id column linked to your parameter.
It should just work; unless there is some nuance in your case that I am unable to see.
Hi @Giridhar.Prabhu
I did this initially but whenever I clicked a Shop ID from the drop down list I received an unhelpful filter error for the visuals with calculated fields that the Shop ID filter was applied to, it doesn’t work, which is why I am here asking why. The visuals returning the error are supposed to display a calculated field with this formula: sum(hours)/distinctcount(id)
I created a parameter on Shop Id (String column); Create the measure as follows
I added this measure to a visualization and applied the filter on shop id
When I filter the visualization it just works fine
It appears there is something more happening in your analysis that is causing the problem. I think you should create a case for this in Arena for further analysis
Ah, so the calculated field in your simulation includes the field that it’s being filtered by, in my analysis the ‘id’ ← in the formula ‘sum(hours)/distinct_count(id)’, refers to another column that isn’t ‘shop_id’ and is of an integer data type