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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
DanielAndress
Contributor
Contributor

IF statement trouble

Hi, 

The problem I am trying to solve is using an IF statement to create a dimension that allocates products to catagory types (footwear if categoryID is 5 or 6, or Clothing if any other ID) based on CatagoryID.

It's coming up with the catagories however there is also an extra grey colum and i am stuck on what to do. Thank you.CAT CODE.PNG

 

cat ID.PNG

 

Qlik clothing.PNG

 

Labels (1)
2 Replies
barnabyd
Partner - Creator III
Partner - Creator III

G'day @DanielAndress,

The grey column represents all the data rows that don't have a value for CategoryID. If you don't want it to appear, then go to the properties of your chart and under the Category Type dimension, uncheck "Include null values".

Cheers, Barnaby.

Barnaby Dunn
BI Consultant
BrunPierre
Partner - Master II
Partner - Master II

As an alternative, you might prefer to use an expression filter. By doing this, the chart will only show the desired labels.
 

Sum({<CategoryID={5,6}>}Sales)