Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
pavanpatha
Contributor III
Contributor III

Issue with sorting a straight table with multiple expression

Hi,

I have a straight table with 5 dimensions and 2 expressions. I am facing issues with sorting by expressions

Expression1 calculates Revenue in million or thousands ( eg: 5.0, 4.2, 4.1):

=if($(vCalc_Nsr)>1000000, DUAL(NUM($(vCalc_Nsr)*0.000001,'#,##0.0'),$(vCalc_Nsr)), DUAL(NUM($(vCalc_Nsr)*0.001,'#,##0'),$(vCalc_Nsr)))

Expression 2 indicates the text value as Million or thousand ( Million or thousand):

=if(top($(vCalc_Nsr))>1000000, 'million', 'thousand')

So overall the straight table values appears as 5.0 Million, 4.3 million, 3.0 thousand and so on.

Now, the problem is with sorting. I am able to get values in right sort order if expression 2 is disabled. but If I include expression 2, the sort order is getting disturbed. is there any way I can exclude expression 2 from sorting but should be shown in chart

P.S: I need to have two expressions mandatory because the client need a different font size for both. Expression1 for revenue with font size 10 and expression2 with font size 8.

2 Replies
marcus_sommer
MVP & Luminary
MVP & Luminary

Have you tried it without sort-expression. In a straight-table you could sort by a double-click on the column-header from each column. Another possibility is to use only one expression-column and add for thousands/millions simply a "k" or "m" then to show this in full-length is no added value.

- Marcus

maxgro
MVP
MVP

in sort tab uncheck all (sort by) for expression 2

or use dual in expression2 and sort number

=if(top($(vCalc_Nsr))>1000000, dual('million', $(vCalc_Nsr)), dual('thousand', $(vCalc_Nsr)))