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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
lneidorf
Contributor II
Contributor II

Customize Dimensions with Wildcards

Hi there.

I support a product that has a Business Intelligence module powered by Qlik Sense. 

In constructing some Bar Charts, I've been trying to customize some of the underlying fields, to no avail.

We have a filed called "User Name".  This pulls from both internal administrative users, and external client users. I'm trying to use the User Name as a Dimension, and restrict it to only users with a certain prefix. That way, these charts would display only the client user data, eliminating the need to apply filters every time.

I'm trying to write something that would restrict the resulting data to only users with user names starting with an "abc" prefix. Something like this:

[User Name] = abc*

The syntax doesn’t appear to be working. Any advice?

Thanks very much!

Labels (2)
3 Replies
ArnadoSandoval
Specialist II
Specialist II

Hi @lneidorf 

This expression returns 1 if the the user name start with 'abc', zero otherwise

WildMatch(Mid([User Name],1, 3), 'abc*')

 Hope this helps,

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.
lneidorf
Contributor II
Contributor II
Author

Thanks for the response, @ArnadoSandoval. I stumbled upon this expression, which seemed to do the trick:

=If([User Name] like 'abc*', [User Name])

 

ArnadoSandoval
Specialist II
Specialist II

@lneidorf 

Actually it does the job !!!

Arnaldo Sandoval
A journey of a thousand miles begins with a single step.