Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
joshibabu_are
Contributor
Contributor

sort order in straight table

Hi Guru;s

I want to sort country column based on total employee count in all locations.

example :BU-API

                Country - USA

           employee count in 5 locations in us is less when compared to ITA(ITALY).

So ITA Should show first in Country column

US Head Count:431---For Business Unit-API

ITA head Count 505------For Business Unit-API

here pivot table not preferable because iam going to use this table in Nprinting.Nprinting wont support pivot table.

Please find the attached qlikview file

Thanks,

Joshi

1 Solution

Accepted Solutions
sunny_talwar

Looks better?

Updated: Use a calculated dimension like this

Dual(Country, Aggr(NODISTINCT Sum([Actial Headcount]), [Business Unit], Country))

View solution in original post

13 Replies
jerryyang756
Creator
Creator

Add a expression as Sort Expression

AGGR(sum([2017 EOY Headcount]),Country,[Business Unit])

In sort Promote this expression to the top and Sort it in a Descending Order.

From Presentation tab Hide this expression.

sdf.PNG

YoussefBelloum
Champion
Champion

Hi,

do you want to create the sorting based on the total employees count or on the total employees count for business unit API ??

because on the total without choosing a business unit, US should be Ranked N1

joshibabu_are
Contributor
Contributor
Author

i want to show based on actual headcount expression .

iam going to write this sort expression in Country sort expression

Thanks

YoussefBelloum
Champion
Champion

Yes I understand that.

US is ranked 1 based on the GRAND TOTAL

and ITALY is ranked 1 base on the total by BU

if you're looking for the second option so take the solution provided above by Pritam

joshibabu_are
Contributor
Contributor
Author

hi Pritam Thanks for your time.

all the Business units should be one place after that DDA, next DP   .....

how to achieve this

Thanks

sunny_talwar

Is this what you are after?

Capture.PNG

Created an extra expression using this expression

Aggr(NODISTINCT Sum([Actual Headcount]), [Business Unit], Country)

Used it second in the sort order and hide the expression from the presentation tab.

joshibabu_are
Contributor
Contributor
Author

Iam working in qlik sense environment

any thoughts how to achieve same in Qlik sense

sunny_talwar

Nice, you shared a qvw for qlik sense requirement ... Can you share the same thing in qvf to test out?

joshibabu_are
Contributor
Contributor
Author

same using in Qlik sense nothing change