<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: hyperCube sorting issue in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457849#M20705</link>
    <description>&lt;P&gt;No I'm sorry, I'm not following. You've uploaded an app with a pivot table with all dimensions sorted by default (it means your values will be sorted by ascii asc if they are strings, by numberically desc if they are numbers).&lt;/P&gt;
&lt;P&gt;Why you are saying that first dimension is not sorted correctly? It is sorted by ascii asc correctly.&lt;/P&gt;
&lt;P&gt;Please could you provide me the expected sorting behaviour with an example with data?&lt;/P&gt;</description>
    <pubDate>Thu, 30 May 2024 12:51:24 GMT</pubDate>
    <dc:creator>alex_colombo</dc:creator>
    <dc:date>2024-05-30T12:51:24Z</dc:date>
    <item>
      <title>hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2006048#M17600</link>
      <description>&lt;P&gt;Hi, i have a simple hyperCube with a couple of dimensions and measures.&amp;nbsp; i added a sorting number in the first column as there is a customized sort order depending on the dimensions being pulled.&amp;nbsp; the sort field is a unique number per row.&lt;BR /&gt;&lt;BR /&gt;i first created a table in QS using the SORT column and its sorting as expected.&lt;/P&gt;
&lt;P&gt;when i pulled the HC in a mashup, its not sorting accroding to the SORT column.&amp;nbsp; theis is my config:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"qLabel": "TableSort","qLibraryId": "uGHpA","qNullSuppression": true,//"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}, 
					"qSortCriterias": [{"qSortByState": 0,"qSortByFrequency": 0,"qSortByNumeric": 1,"qSortByAscii": 0,"qSortByLoadOrder": 0,}]},&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ive tried a combination of sort by number and sort by ascii - doesnt work as expected,&amp;nbsp; in the create cube call, ive tried different combinations with the intercolumn sort order but i cant figure out what it is sorting by:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;App.createCube({
            		"qInitialDataFetch": [{"qTop": TopRow,"qHeight": Height,"qWidth": (Dimensions.length + Measures.length)}],
            		"qDimensions": Dimensions,
            		"qMeasures":  Measures,
            		"qSuppressZero": false,"qSuppressMissing": false,"qMode": "S","qInterColumnSortOrder": [0],"qStateName": "$"&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;has anyone experienced this problem and solved it?&amp;nbsp; if you have, what did you do?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;P&gt;edwin&lt;/P&gt;</description>
      <pubDate>Thu, 17 Nov 2022 18:41:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2006048#M17600</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-11-17T18:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007177#M17614</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;maybe it works in your QS table becaase you have manually modified the column order changing field position in Sort configuration?&lt;/P&gt;&lt;P&gt;Anyway, when I create Hypercubes I always specify sort order. In your qDef property add your sorting criteria for the first dimension and it should fix it. In below example I'm sorting my field with an ascending expression using a data moel field. If you want descending put -1 for &lt;EM&gt;qSortByExpression&lt;/EM&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;"qDef": {
	"qFieldDefs": [
		"AsciiNum"
	],
	"qSortCriterias": [
		{
			"qSortByState": 0,
			"qSortByFrequency": 0,
			"qSortByNumeric": 0,
			"qSortByAscii": 0,
			"qSortByLoadOrder": 1,
			"qSortByExpression": 1,
			"qExpression": {
				"qv": "AsciiNum"
			},
			"qSortByGreyness": 0
		}
	]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 16:58:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007177#M17614</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-21T16:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007246#M17615</link>
      <description>&lt;P&gt;Hi Alex,&lt;/P&gt;
&lt;P&gt;thanks for the response.&amp;nbsp; perhaps you didnt ntice i do have that sort specified in my dimension:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="lia-code-sample  language-markup"&gt;&lt;CODE&gt;{"qLabel": "TableSort","qLibraryId": "uGHpA","qNullSuppression": true,//"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}, 
					"qSortCriterias": [{"qSortByState": 0,"qSortByFrequency": 0,"qSortByNumeric": 1,"qSortByAscii": 0,"qSortByLoadOrder": 0,}]},&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the reason, i refer to the table is to express the fact that ive checked the sorting and that it works.&amp;nbsp; the table is the first thing i check and see how i want it sorted.&lt;/P&gt;
&lt;P&gt;the werid thing is that i do have a few other hypercubes (although it is simpler than this particular one)and ive used the same sort spec and it is working.&amp;nbsp; its just in this one HC that sorting does not work.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Nov 2022 19:29:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007246#M17615</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-11-21T19:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007411#M17620</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;, yes I see your sorting. Unfortunatly, without the app, I cannot tell you what is the reason why this numeric sorting is not working.&lt;/P&gt;&lt;P&gt;Please, try to force sorting with qSortByExpression, insert your numeric field in the expression and check what happen.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 07:55:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007411#M17620</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-11-22T07:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007751#M17626</link>
      <description>&lt;P&gt;Hi Alex,&lt;BR /&gt;i didnt think to use expressions.&amp;nbsp; but i tried it just now and it didnt work.&amp;nbsp; i simplified the dimension objects and specified sorting in just that field, also tried a couple of combinations with autosort and expressions nothing worked.&amp;nbsp; i will take it up with management to share the mashup and application (we opened a ticket with support) but its slow going due to reluctance to share the app.&amp;nbsp; ill update this thread if we do get this resolved&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 16:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2007751#M17626</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-11-22T16:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2011161#M17681</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;i just noticed that the hypercube is actually sorted by load order: qEelemntNumber. this is regardless if I add&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;LI-CODE lang="markup"&gt; "qSortCriterias": [{
 	"qSortByNumeric": 1
 	//"qSortByExpression": 1,
	//"qExpression": {
	//	"qv": "num(fact_order_en)"
	//},
}]&lt;/LI-CODE&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;on the first column. ive tried sort by ascii, sort by expression. it is still sorted by load order.&lt;BR /&gt;&lt;BR /&gt;is there a way to override the sort by load order?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 20:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2011161#M17681</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-11-30T20:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2011309#M17683</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;it should be a way for doing this but, I'd like to have the app. Is there a way for upload the app with scrambled or fake data? I have to play with sorting directly in app for understanding the issue&lt;/P&gt;</description>
      <pubDate>Thu, 01 Dec 2022 08:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2011309#M17683</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2022-12-01T08:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2014377#M17723</link>
      <description>&lt;P&gt;Hi Alex, thanks for looking into this.&amp;nbsp; im working to re-cretae the error with a striped down app and different QVF.&amp;nbsp; ill post as soon as i finish it.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Dec 2022 14:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2014377#M17723</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2022-12-08T14:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2456661#M20674</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/145804"&gt;@alex_colombo&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi and it has been a while since i got back to this.&amp;nbsp; i was having a hard time getting approval to share our apps even when stripped down.&lt;BR /&gt;i did the easiest thing as the process was dragging - sort it in the mashup.&amp;nbsp; now that i have time for this, i decided to test this using random data and i was able to replicate my issue.&amp;nbsp; this time im using a pivot but i think the issue and solution should apply to straight tables as well.&amp;nbsp; &lt;BR /&gt;&lt;BR /&gt;i have 3 dimensions and 1 measure, each dimension - i left sorting by default.&amp;nbsp; output is still sorted by load order i think - at least not what i was expecting.&amp;nbsp; ive attached both dashboard and mashup.&amp;nbsp; mashup only outputs to console for simplicity&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;&lt;SPAN&gt;edwin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 16:32:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2456661#M20674</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2024-05-27T16:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457509#M20695</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/58578"&gt;@edwin&lt;/a&gt;&amp;nbsp;what is the expected sorting for this pivot table? Which field do you want to sort and how (by numeric asc, by ascii desc, by expression, etc..)?&lt;/P&gt;</description>
      <pubDate>Wed, 29 May 2024 13:26:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457509#M20695</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-05-29T13:26:51Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457591#M20698</link>
      <description>&lt;P&gt;hi Alex&lt;BR /&gt;thanks for the swift reply.&amp;nbsp; the attached example has inter column sort order as 0,1,2,3.&amp;nbsp; even the first dimension isnt sorting properly.&amp;nbsp; the dimensions are sorted by default - other ascending:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{"qDef": {"qFieldDefs": ["province"]},
			"qNullSuppression": true,"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherSortMode": "OTHER_SORT_ASCENDING","qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}
		},
		{"qDef": {"qFieldDefs": ["region"]},
			"qNullSuppression": true,"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherSortMode": "OTHER_SORT_ASCENDING","qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}
		},
		{"qDef": {"qFieldDefs": ["city"]},
			"qNullSuppression": true,"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherSortMode": "OTHER_SORT_ASCENDING","qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}
		},
		{
			"qDef": {"qFieldDefs": ["indicator_code"]},
			"qNullSuppression": true,"qOtherTotalSpec": {"qOtherMode": "OTHER_OFF","qSuppressOther": true,"qOtherSortMode": "OTHER_SORT_DESCENDING","qOtherCounted": {"qv": "5"},"qOtherLimitMode": "OTHER_GE_LIMIT"}
		}


"qMeasures": [
		{"qLabel": "Measure","qLibraryId": "LbjVGw",
			"qSortBy": {"qSortByState": 0,"qSortByFrequency": 0,"qSortByNumeric": 0,"qSortByAscii": 1,"qSortByLoadOrder": 0,"qSortByExpression": 0,"qExpression": {"qv": " "}}
		}
	],
	"qSuppressZero": false,	"qSuppressMissing": false,	"qInterColumnSortOrder": [0,1,2,-3],	"qStateName": "$","qMode": "P","qAlwaysFullyExpanded": true, "qNoOfLeftDims": 3
	},tmp);&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 29 May 2024 16:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457591#M20698</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2024-05-29T16:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: hyperCube sorting issue</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457849#M20705</link>
      <description>&lt;P&gt;No I'm sorry, I'm not following. You've uploaded an app with a pivot table with all dimensions sorted by default (it means your values will be sorted by ascii asc if they are strings, by numberically desc if they are numbers).&lt;/P&gt;
&lt;P&gt;Why you are saying that first dimension is not sorted correctly? It is sorted by ascii asc correctly.&lt;/P&gt;
&lt;P&gt;Please could you provide me the expected sorting behaviour with an example with data?&lt;/P&gt;</description>
      <pubDate>Thu, 30 May 2024 12:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/hyperCube-sorting-issue/m-p/2457849#M20705</guid>
      <dc:creator>alex_colombo</dc:creator>
      <dc:date>2024-05-30T12:51:24Z</dc:date>
    </item>
  </channel>
</rss>

