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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sorting if statement criteria within a pivot chart

Hi,

the first dimension within my Pivot Chart dimension

is Account,  the second reads like this:-

=If(WildMatch(Code, '*WALL*'), 'Wall Paper',
  If(WildMatch(Code, '*PAINT*'), 'Paint',
  If(WildMatch(Code, '*NAT*'), 'Natural',' ' )))

the Count "quantity"  is in the Dimension.

so my chart looks like this:-

                    WallPaper        Paint               Natural

Account A    10                    0                      6

Account B      9                    5                      2

I would like the sort order to be Natural, WallPaper, Paint.

Where do i do this?

I have tried an Aggr function in the  sort function with no luck.  Any help appreciated.     

1 Solution

Accepted Solutions
sunny_talwar

Or you can change your calculated dimension to this:

=If(WildMatch(Code, '*WALL*'), Dual('Wall Paper', 2),

  If(WildMatch(Code, '*PAINT*'), Dual('Paint', 3),

  If(WildMatch(Code, '*NAT*'), Dual('Natural', 1), Dual(' ', 4))))

View solution in original post

8 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Use Sort by Expression - Sort order ascending

Expression as WildMatch(Code, '*NAT*','*PAINT*','*WALL*')

sunny_talwar

Or you can change your calculated dimension to this:

=If(WildMatch(Code, '*WALL*'), Dual('Wall Paper', 2),

  If(WildMatch(Code, '*PAINT*'), Dual('Paint', 3),

  If(WildMatch(Code, '*NAT*'), Dual('Natural', 1), Dual(' ', 4))))

Kushal_Chawda

create the conditions using dual function

If(WildMatch(Code, '*WALL*'), dual('Wall Paper',3),

  If(WildMatch(Code, '*PAINT*'), dual('Paint',2),

  If(WildMatch(Code, '*NAT*'), dual('Natural',1),' ' )))

sunny_talwar

Oye cheating kar raha hun tu meri

Kushal_Chawda

Nahi..muje type karne me 5 min ka time lagta.. mene dekh hi nahi tu already dala he

Kushal_Chawda

Notepad me code likhta me

sunny_talwar

Why notepad?

Kushal_Chawda

QlikView nahi he na... or koi option he kya?