Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dimension value missing show its expression as NA

There is a dimension having text values, a specific should be counted. It is counted using using substringcount but I want it to be case insensitive, 1) so do you have other workaround?

2) count is showing 0 where this dimension value is missing, I want it to show as NA?

3 Replies
marcus_sommer

1. you could use upper/lower for this: substringcount(Upper(YourField), 'X')

2. use a simple if(expression = 0, 'NA', expression)

- Marcus

Not applicable
Author

There is a case where expression is zero and it should  be 0 only.I am talking about case where there is no field value( field value missing). Does upper/lower do case insensitive operation. Count should consider all words like Apple, apple, APPLE, AppLe etc.,

marcus_sommer

If you have a dimension-value which will be displayed and no transaction-values for them each matching/calculation will be return NULL. This could be tried to fetched with a expression like: if(transactionField, expression, 'NA') or easier within the object-properties in tab presentation within the bottom left various options for NULL and missing values. But if there are no dimension- and transaction-values you couldn't display it - you would need to create those missing values within the script.

Substringcount is further case-sensitive but with lower/upper you converted the value first and could then compare against a single-case. In your example upper(Field) = 'APPLE' would match all of them "Apple, apple, APPLE, AppLe".

- Marcus