We would like to create a bar chart in views where the dimension input is not directly available from any field in the model and where the measure logic depends on the value of this custom dimension.
The idea was therefore to create a table in the model and use this as custom input for the dimension while using a CASE WHEN statement to create the different measures depending on the value of the customized dimension like this:
CASE WHEN “Custom Dimension” = ‘X’ THEN KPI("KPI1")
CASE WHEN “Custom Dimension” = ‘Y’ THEN KPI("KPI2")..... etc.
Since the custom table is not linked to the model we get a PQL error that ‘No common table could be found....’.
Is there any workaround for this in order to be able to use custom dimensions in an easy way?