Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
Levi
Partner - Contributor
Partner - Contributor

qInterColumnSortOrder in Hypercube

Hi all,

I'm having an issue with my hypercube where I can't get it to sort on my measure.

my hypercube is:

{
  "qInfo": {
    "qType": "HyperCube"
  },
  "qHyperCubeDef": {
    "qDimensions": [{
      "qDef": {
        "qFieldDefs": ["forename"],
        "qSortCriterias": [{
          "qSortByAscii": 1
        }],
        "autoSort": false
      }
    }, {
      "qDef": {
        "qFieldDefs": ["surname"],
        "qSortCriterias": [{
          "qSortByAscii": 1
        }],
        "autoSort": false
      }
    },
    {
      "qDef": {
        "qFieldDefs": ["code"],
        "qSortCriterias": [{
          "qSortByAscii": 1
        }],
        "autoSort": false
      }
    }],
    "qMeasures": [{
      "qDef": {
        "qDef": "=Sum({<year={2018}>}results.points)",
        "autoSort": false
      },
      "qSortBy": {
        "qSortByNumeric": -1
      }
    }],
    "qInitialDataFetch": [{
      "qTop": 0,
      "qLeft": 0,
      "qWidth": 4,
      "qHeight": 100
    }],
    "qInterColumnSortOrder": [1, 2, 3, 0],
    "qSuppressMissing": true
  }
}

From my understanding the order of qInterColumnSortOrder should be the order of which they are shown in the hypercube. My measure is last so it the order should be [1, 2, 3, 0] but it's not working. It doesn't matter what combination I try, it never works.

Am I doing anything wrong here?

 

Thanks

Labels (2)
1 Reply
ErikWetterberg
Master
Master

Hi,

Your measure will be number 3, so try [3,1,2,0]. A way to find out is to build your table in the standard client, make the sorting you want and then use the developer menu to inspect the properties.