
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
IF statement as Custom dimension
Hi,
I have a group of store locations.. I need to identify as either "Joint Venture" or "Enterprise" in my charts.
I have a custom dimension with the following expression:
=IF(StoreName = 'Derm 1' or
'Derm 3' or 'Derm 4', 'Enterprise', 'Joint Venture')
But it only picks up 'Derm 1' as Enterprise and not the other two. What am I missing?
Thanks in advance.
- Tags:
- if-else
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
=If(Match(StoreName, 'Derm 1', 'Derm 3', 'Derm 4'), 'Enterprise', 'Joint Venture')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this
=If(Match(StoreName, 'Derm 1', 'Derm 3', 'Derm 4'), 'Enterprise', 'Joint Venture')


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
if(match(StoreName, 'Dem 1','Dem 3','Dem 4') > 0, 'Enterprise', 'Joint Venture') as Dim1
Regards,
Patric

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, works great.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you have missed to call that field name for multiple times like below
basic if condition :
=IF(StoreName = 'Derm 1' or StoreName = 'Derm 3' or StoreName = 'Derm 2' ,'Enterprise', 'Joint Venture')
simplified if condition
if(match( StoreName , 'Derm 1' ,'Derm 3','Derm 2') ,'Enterprise', 'Joint Venture')
and if you wish to apply wildcard then try to use like below
example, if u like to search all StoreName starting with Derm* then u can define like below,
If(WildMatch(StoreName , 'Derm*'),'Enterprise', 'Joint Venture')
Thanks,Deva

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
devarasu07 you have been all about options recently. I like it ... Always good to have multiple ways to do the same thing. Thanks for your contribution

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, the wildcard will work even better.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi stalwar1
Thank you! , You're the most Inspiration for all the Qlik newbie and thanks you too for the valuable contribution.
Regards,
Deva

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads as HELPFUL if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads as HELPFUL if you feel additional info is useful to others.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
try this as well with wild card
pick(WildMatch(StoreName , 'Derm*')+1,'Joint Venture','Enterprise')

- « Previous Replies
-
- 1
- 2
- Next Replies »