Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

If statement for dimension, exclude fields, handle nulls

I have a field, 'Group' that I am using as a dimension. I am excluding certain values from the dimension, such as 'ABC', 'DEF', by =IF(Not Match(Group, 'ABC', 'DEF), Group) however, would there be a way to introduce more logic to rename fields that are blank or null?

11 Replies
Highlighted

Something like this?

=If(Len(Trim(Group)) = 0, 'BLANK',
 If(Not Match(Group, 'ABC', 'DEF), Group))
Highlighted
Specialist
Specialist

The structure of the calculated dimension works, however when I apply to my chart, the value still returns as   '-     '

Highlighted

Is there a dash before the blank space?

Highlighted
Specialist
Specialist

My reply above is how my chart is displaying the row with the null or blank values:

 

'-   '   I was just attempting to demonstrate that the dash is on the left of the cell,if that is of any significance.

Highlighted

Can you show a screenshot to show the issue?

Highlighted
Specialist
Specialist

 
Highlighted

I think this null is related to if condition not Match(Group, 'ABC', ...)... in order to get rid of this, uncheck 'Show zero value' under your dimension

Highlighted
Specialist
Specialist

I want to show the blank field as it is important to the data in this application. I want to rename the blank field something like 'No Preference'

Highlighted

Try this

=If(Not Match(Group, 'ABC', 'DEF), Group, 'No Preference')