How to use selected value from filtered list in case function to make measure from dimension

Some chart types we can only use one dimension in X axis, then I am thinking whether we translate the dimension to measure for example

Year Category Sales Profit
2016 Groceries 1000 500
2017 Furniture 2000 1200
2018 Clothes 4000 3000

Dimension-X axis - Year
Measure - Sales for Groceries, Sales for Furniture, Sales for Clothes.
If category is fixed, we can use function case but in fact our data has thousands types.

Is there a way to use function case together with selected value from filtered list. e.g. Catetory A, B, D are selected then we can use case when sales [caterory.list] etc.
Just try to think how to make it work :slight_smile:
Thank you very much.

@Stima_Livingpresent Have you looked into parameters? here’s an intro training video : 08. Into to Parameters

With parameters you can use filter selections in your visual calculations.

Here an example scenario: Month over Month comparison using parameters

Hi @Stima_Livingpresent , I know my suggestion doesn’t answer your request directly, but why not create a dimension as a custom expression where it would be CONCATENATE([Year], ’ - ', [Category])?

Hi, we want to show KPIs in the same time line to compare performance for each objects.

Our time granularity is hourly and a number of selected objects range from 3-20. So it is not convenient for users to select individual object from parameters list but if no other options we would need to do that way :-).

1 Like

@Stima_Livingpresent It’s not clear to me exactly what you are looking for. Perhaps an example screenshot would help.

Also, I’m sure you are aware of trellising feature. Whereby you can place two dimensions on the same shelf and it will cause multiple lines/bars to appear.