Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
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
Partner - Master

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)