Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vanand3535
Contributor

How to sort dimension by expression and remove some valus of dimension in QLik sense

Screenshot (226).png

Dimension----Category

Measure----Sum(Sales)

First of all I have tried to sort the dimension values that I have done successfully by expression:-

If(CategoryName='Men´s Footwear',1,

if(CategoryName='Babywear',2,

if(CategoryName='Children´s wear',3,

if(CategoryName='Ladies´Footwear',4,

if(CategoryName='Bath Clothes',5,

if(CategoryName='Sportwear',6,

if(CategoryName='Womens wear',7,

if(CategoryName='Men´s Clothes',8

))))))))

Now I want to remove some of the values from the dimension lik:-

Babywear, Men's Clothes, Sportwear


So, How can I do this?

8 Replies
colmkelly
New Contributor II

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

Hi Vivek,

You can use set expression in your measure to exclude values you're not interested in.

Check out:

https://help.qlik.com/en-US/sense/September2017/Subsystems/Hub/Content/ChartFunctions/SetAnalysis/se...

Set Analysis Wizard for QlikView | qlikblog.at

isingh30
Contributor III

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

You want to remove them (permanently) or hide them & change the order?

vanand3535
Contributor

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

just wanna hide two-three values from dimension

tell me both how to hide and delete values from dimension after sorting

because sorting i have already done successfully

isingh30
Contributor III

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

You can hide by putting // in front of if statement & for the rest you can change the order.

isingh30
Contributor III

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

You can remove if statement from the script as well but it's not a dynamic solution. I believe your data will change in future. Agreed?

vanand3535
Contributor

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

Just now I tried

In Measure I tried the syntax:-

Sum({<CategoryName -={'Babywear','Sportwear','Ladies´Footwear'}>}Sales)

it's working well.

is this correct or not?

Screenshot (235).png

vanand3535
Contributor

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

Just now I tried

In Measure I tried the syntax:-

Sum({<CategoryName -={'Babywear','Sportwear','Ladies´Footwear'}>}Sales)

it's working well.

is this correct or not?

Screenshot (236).png

vanand3535
Contributor

Re: How to sort dimension by expression and remove some valus of dimension in QLik sense

where I need to use //

In sorting syntax:-

If(CategoryName='Men´s Footwear',1,

if(CategoryName='Babywear',2,

if(CategoryName='Children´s wear',3,

if(CategoryName='Ladies´Footwear',4,

if(CategoryName='Bath Clothes',5,

if(CategoryName='Sportwear',6,

if(CategoryName='Womens wear',7,

if(CategoryName='Men´s Clothes',8

))))))))

Community Browser