8 Replies Latest reply: May 27, 2016 5:26 AM by kushal chawda

# 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.

• ###### Re: sorting if statement criteria within a pivot chart

Use Sort by Expression - Sort order ascending

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

• ###### Re: sorting if statement criteria within a pivot chart

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))))

• ###### Re: sorting if statement criteria within a pivot chart

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),' ' )))

• ###### Re: sorting if statement criteria within a pivot chart

Oye cheating kar raha hun tu meri

• ###### Re: sorting if statement criteria within a pivot chart

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