<?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 Qlik sense sort chart bar by expression dos not wor for small values in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-sense-sort-chart-bar-by-expression-dos-not-wor-for-small/m-p/1645232#M48120</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a bar chart with two selectable dimensions /stack, bar and two selectable measures.&lt;/P&gt;&lt;P&gt;The measures expressions are in variables. The percenatges should be formatted to support many languages&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vMeasurementsTotal = Num(
Count({$&amp;lt;DataType*={'$(cDataType)'}, %AutoId-={'*'} &amp;gt;} Distinct %MasterPrimaryKey)
/ 
Count({&amp;lt;DataType*={'$(cDataType)'}&amp;gt;} total Distinct %MasterPrimaryKey)
, '0$(DecimalSep)00%', '$(DecimalSep)', '$(ThousandSep)')

 

LET vResultsTotal = Count({$&amp;lt;DataType*={'$(cDataType)'}, %AutoId-={'*'} &amp;gt;} Distinct %PrimaryKey)
/ 
Count({&amp;lt;DataType*={'$(cDataType)'}&amp;gt;} total Distinct %PrimaryKey)
, '0$(DecimalSep)00%')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user selects the measure (fox example Results) and the Sorting dimension has the expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(GetObjectMeasure()= 'Results'
, $(vWestgardMeasurementsTotal)
, $(vWestgardResultsTotal)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The selected Chart Sorting properties are: Sort by expression, Descending - Sort numerically, Descending - Sort alphabetically, Descending&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sorting works but not always. If you see the screen shot I have attached it sorts by expression like this&lt;/P&gt;&lt;P&gt;6.71&lt;BR /&gt;3.86&lt;BR /&gt;3.09&lt;BR /&gt;2.90&lt;BR /&gt;......&lt;/P&gt;&lt;P&gt;0.17&lt;BR /&gt;0.14&lt;BR /&gt;0.14&lt;BR /&gt;0.08&lt;BR /&gt;&lt;STRONG&gt;0.11 that is wrong&lt;/STRONG&gt;&lt;BR /&gt;0.08&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrong? Any help?&lt;/P&gt;&lt;P&gt;Qlik Sense Enterprise April 2019&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 10:03:21 GMT</pubDate>
    <dc:creator>athinadev</dc:creator>
    <dc:date>2019-11-11T10:03:21Z</dc:date>
    <item>
      <title>Qlik sense sort chart bar by expression dos not wor for small values</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-sense-sort-chart-bar-by-expression-dos-not-wor-for-small/m-p/1645232#M48120</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am using a bar chart with two selectable dimensions /stack, bar and two selectable measures.&lt;/P&gt;&lt;P&gt;The measures expressions are in variables. The percenatges should be formatted to support many languages&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;LET vMeasurementsTotal = Num(
Count({$&amp;lt;DataType*={'$(cDataType)'}, %AutoId-={'*'} &amp;gt;} Distinct %MasterPrimaryKey)
/ 
Count({&amp;lt;DataType*={'$(cDataType)'}&amp;gt;} total Distinct %MasterPrimaryKey)
, '0$(DecimalSep)00%', '$(DecimalSep)', '$(ThousandSep)')

 

LET vResultsTotal = Count({$&amp;lt;DataType*={'$(cDataType)'}, %AutoId-={'*'} &amp;gt;} Distinct %PrimaryKey)
/ 
Count({&amp;lt;DataType*={'$(cDataType)'}&amp;gt;} total Distinct %PrimaryKey)
, '0$(DecimalSep)00%')&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The user selects the measure (fox example Results) and the Sorting dimension has the expression&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(GetObjectMeasure()= 'Results'
, $(vWestgardMeasurementsTotal)
, $(vWestgardResultsTotal)
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The selected Chart Sorting properties are: Sort by expression, Descending - Sort numerically, Descending - Sort alphabetically, Descending&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The sorting works but not always. If you see the screen shot I have attached it sorts by expression like this&lt;/P&gt;&lt;P&gt;6.71&lt;BR /&gt;3.86&lt;BR /&gt;3.09&lt;BR /&gt;2.90&lt;BR /&gt;......&lt;/P&gt;&lt;P&gt;0.17&lt;BR /&gt;0.14&lt;BR /&gt;0.14&lt;BR /&gt;0.08&lt;BR /&gt;&lt;STRONG&gt;0.11 that is wrong&lt;/STRONG&gt;&lt;BR /&gt;0.08&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am doing wrong? Any help?&lt;/P&gt;&lt;P&gt;Qlik Sense Enterprise April 2019&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 10:03:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-sense-sort-chart-bar-by-expression-dos-not-wor-for-small/m-p/1645232#M48120</guid>
      <dc:creator>athinadev</dc:creator>
      <dc:date>2019-11-11T10:03:21Z</dc:date>
    </item>
  </channel>
</rss>

