Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am using a bar chart with two selectable dimensions /stack, bar and two selectable measures.
The measures expressions are in variables. The percenatges should be formatted to support many languages
LET vMeasurementsTotal = Num( Count({$<DataType*={'$(cDataType)'}, %AutoId-={'*'} >} Distinct %MasterPrimaryKey) / Count({<DataType*={'$(cDataType)'}>} total Distinct %MasterPrimaryKey) , '0$(DecimalSep)00%', '$(DecimalSep)', '$(ThousandSep)') LET vResultsTotal = Count({$<DataType*={'$(cDataType)'}, %AutoId-={'*'} >} Distinct %PrimaryKey) / Count({<DataType*={'$(cDataType)'}>} total Distinct %PrimaryKey) , '0$(DecimalSep)00%')
The user selects the measure (fox example Results) and the Sorting dimension has the expression
if(GetObjectMeasure()= 'Results' , $(vWestgardMeasurementsTotal) , $(vWestgardResultsTotal) )
The selected Chart Sorting properties are: Sort by expression, Descending - Sort numerically, Descending - Sort alphabetically, Descending
The sorting works but not always. If you see the screen shot I have attached it sorts by expression like this
6.713.863.092.90......
0.170.140.140.080.11 that is wrong0.08
What I am doing wrong? Any help?
Qlik Sense Enterprise April 2019
Thanks in advance