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: 
vanand3535
Creator III
Creator III

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
Anonymous
Not applicable

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

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

vanand3535
Creator III
Creator III
Author

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

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

isingh30
Specialist
Specialist

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
Creator III
Creator III
Author

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
Creator III
Creator III
Author

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
Creator III
Creator III
Author

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

))))))))