Dimension control - controlling sort order

Hello everyone,

I was wondering if it is possible to control the way a chart is sorted (along a dimension) using the dimensions control?

My example: I have a bar chart that needs to show a dissagregated metric along a few dimensions, which can be selected via a dimension control.

When selecting a desired dimension (via the dimension control), the bar chart dimension is updated ok, but the sort order remains tied to whichever sort order was set initially, making further inspection of the metric profile difficult (if it is not the same as the one set initially)

Thanks and kind regards

Marko

 

 

2 3 1,122
3 REPLIES 3

did you find a fix for this?

I have the same issue, would be great to solve this, tbh stupid problem

I know this thread is somewhat old, but I have the same issue and I figure that no one has a fix for this. I am writing here now to let everyone know that there is a way around this, but it takes a few complicated steps.

  1. Create a text parameter with a permitted list of values. Create one value for each dimension in this list. It doesn't matter what the value or labels are, just remember them for later.
  2. Replace the dimension control with a drop down control using your new parameter.
  3. Create a custom dimension that uses a formula based on that parameter to select the proper field. The syntax will be something like this:

    CASE name_of_your_parameter
    WHEN 'first value of your parameter list'
    THEN first_dimension
    WHEN 'second value of your parameter list'
    THEN second_dimension
    END

    You can add as many WHEN/THEN statements for as many dimensions you have in your parameter list.
  4. Use this custom dimension wherever you would use a regular dimension. This includes sorting, drill downs, and filtering. It will always select the dimension associated with the value of your parameter.

Note: you cannot mix text and number dimensions with this drop down so keep that in mind! 

More information on implementing this can be found in this article: https://medium.com/@arkady.zagdan/how-to-dynamically-change-dimensions-and-metrics-on-a-whole-looker...