EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

KB44487: No data returned when applying a filter using contains operator containing multiple values in MicroStrategy


Community Admin

• Strategy


This article describes a limitation with contains filters in MicroStrategy

SYMPTOM:
In Strategy, create a Filter and define its Operator with the "Contains" function by filling with two different values to look for (%USA% or %Web%). When the report is executed no data is returned, and the expected SQL (where a11.[COUNTRY_NAME] like '%USA% ‘ or  ‘%Web%'”) is not achieved.

ka04W000000OfBnQAK_0EM440000002CGY.png

 
Notice in the SQL view, the filter is interpreted to below:
select a11.[COUNTRY_ID] AS COUNTRY_ID,
a11.[COUNTRY_NAME] AS CUST_COUNTRY_DESC0
from [LU_COUNTRY] a11
where a11.[COUNTRY_NAME] like '%%USA% or %Web%%'
 
CAUSE:
This is working as designed.
Currently Strategy doesn’t have support for “Like any” format.
The expected syntax (“where a11. like '%USA% ‘ or ‘%Web%'”) is not valid SQL syntax, no database will support such syntax – the “Like” operator can only accept one pattern.
 
ACTION:
Create multiple filter expressions with OR operator as shown below:
 

ka04W000000OfBnQAK_0EM440000002CGa.jpeg

 

ka04W000000OfBnQAK_0EM440000002CGX.png

 
 
Notice in the SQL view, the filter is interpreted to below:
select a11.[COUNTRY_ID] AS COUNTRY_ID,
a11.[COUNTRY_NAME] AS CUST_COUNTRY_DESC0
from [LU_COUNTRY] a11
where (a11.[COUNTRY_NAME] like '%USA%'
or a11.[COUNTRY_NAME] like '%Web%')  
 
Refer to the article below to take advantage of the command manager script:
KB43225 --- How to create a shortcut to Filter in Strategy Command Manager
 


Comment

0 comments

Details

Knowledge Article

Published:

May 11, 2017

Last Updated:

May 11, 2017