Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to change the order of cell values in dimension in Pivot table?

Hi,

I have below script in qvw

If(MixMatch([Computer Stage],'DELL'),'Station 1',

     If(MixMatch([Computer Stage],'HP',

     'VAIO',

     'INNOVA'),'Former Station 1',

     If(MixMatch([Computer Stage],'PC Application'),'PC Ordered',

     If(MixMatch([Computer Stage],

     'Final DELL - Allocation',

     'Final HP'),'PC Delivered',

If(MixMatch([Computer Stage],'Dockure'),'PC Price',

  If(MixMatch([Computer Stage],

'TOSHIBA'),'Confirmed',

If(MixMatch([Computer Stage],'DELLITE'),'Monitored', [Computer Stage]))))))) as Flag

by using this I have created a pivot table as shown below

Computer StageCEOManagerTeam LeaderTeam Member
Former Station 11720
Station 18
PC Delivered790
PC Ordered
Confirmed12
Monitored8990
PC Price

All I need output is as below I,e to change the order of Computer Stage as below.

Computer StageCEOManagerTeam LeaderTeam Member
Station 11720
Former Station 18
PC Ordered790
PC Delivered
PC Price12
Confirmed8990
Monitored

Would it be possible? Please can anyone suggest me.

Thanks.

1 Solution

Accepted Solutions
robert_mika
Master III
Master III

Or in script:


If(MixMatch([Computer Stage],'DELL'),Dual(Station 1',1),If(  If(MixMatch([Computer Stage],'HP', 'VAIO', 'INNOVA'),Dual('Former Station 1',2) ................


More about Dual:

How to use- Dual()

View solution in original post

4 Replies
sunny_talwar

If these are the only ones that can appear within Computer Stage, you can try the manual sort order:

Match([Computer Stage], 'Station 1', 'Former Station 1', 'PC Ordered', 'PC Delivered', 'PC Price', 'Confirmed', 'Monitored')

I think this should work

Best,

Sunny

ashfaq_haseeb
Champion III
Champion III

Hi,

Try this as your sort Expression

=Dual("Computer Stage",match("Computer Stage" ,'Station 1','Former Station 1','PC Ordered','PC Delivered','PC Price','Confirmed','Monitored'))

Regards

ASHFAQ

robert_mika
Master III
Master III

Or in script:


If(MixMatch([Computer Stage],'DELL'),Dual(Station 1',1),If(  If(MixMatch([Computer Stage],'HP', 'VAIO', 'INNOVA'),Dual('Former Station 1',2) ................


More about Dual:

How to use- Dual()

Not applicable
Author

Thanks. That worked.