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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Incorrect sort results using an expression

Hi Community,

I am now standing besides myself. I have two dimensions Region and Salesperson. Region is sort by text a-> z and only contains data Domestic and International. Salesperson is the second dimension and is sorted by the same expression tused in one of the columns. The column data and therefore the expression is correct but my sort results are not. Please see the table below to see the sort results. The expression I'm using to give me the cumulative sales for the max year selected through the current period.

sum({$<Year = {$(=max(Year))}, Period = {"<=$(=max({<Year={$(=max(Year))}>} Period))"}>} [Sales Amount])



What am I missing?

Thanks,

Rich De Rocco

RegionSalespersonYTD - 2010
Domestica$1,307,076
Domesticb$1,196,986
Domesticc$2,103
Domesticd$1,072,863
Domestice$1,030,485
Domesticf$975,864
Domesticg$919,655
Domestich$818,243
Domestici$804,736
Domesticj$742,346
Domestick$319,157
Domesticl$289,262
Domesticm$244,465
Domesticn$238,466
Domestico$87,412
Domesticp$4,613
Domesticq$158,526
Domesticr$151,445
Domestics$131,843
Domestict$127,935
Domesticu$2,342
Domesticv$82,019
Domesticw$78,184
Domesticx$73,792
Domesticy$1,346
Domesticz$3,375
Internationalb$1,101,941
Internationalb$394,974
Internationaln$146,319
Internationalm$161,761
Internationalj$98,568
Internationalh$58,511
Internationalg$48,244
Internationalffd$41,729
Internationalss$38,603
Internationalgf$32,014
Internationalhg$27,779
Internationalnb$23,866
Internationalghj$23,577
Internationallk$10,252
Internationalr$0
Internationalt$4,882
Internationaly$1,909


3 Replies
vgutkovsky
Master II
Master II

Rich,

Try sorting both Region and Salesperson by that same expression.

Regards,

Not applicable
Author

Thanks for the reply Vlad, but I can't do that because the primary sort for the chart is to organize the data by Region.

Not applicable
Author

Hi Richard,

I'm wondering if you got any answer for your problem? Please let me know the solution if you have.:)

Cheers,

Nima