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

KB4005: How to create a custom expression filter in MicroStrategy Developer 9.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to create a custom expression filter in MicroStrategy Developer 9.x

To create a custom expression filter, the Advanced Qualification Editor must be enabled in the user's project preferences in Strategy Developer 9.x.

  • Right-click on the project name and select My Preferences.

ka02R000000kblRQAQ_0EM440000002GKH.jpeg
  • Go to the Editors section and select Filter.

    8.1.x:

ka02R000000kblRQAQ_0EM440000002GKJ.jpeg
  • 9.x:

ka02R000000kblRQAQ_0EM440000002GKS.gif
  • Enable the 'Show Advanced Qualification' box, as shown below.

ka02R000000kblRQAQ_0EM440000002GKQ.gif

To create an advanced qualification, in the Filter Editor, double-click in the top right-most box to create a qualification and choose Advanced. Click 'OK' and an empty box appears, as shown below:
 

ka02R000000kblRQAQ_0EM440000002GKU.jpeg

 
Whatever is entered into the box must evaluate to either true or false. For example, if users enter '5 = 6,' the report never returns data since this expression never evaluates to true. But if users enter '5 = 5,' nothing is filtered out since this expression always evaluates to true. The two sides of the expression should be separated by an operator (i.e., =, <, >, like, in, etc.).
The ApplySimple and ApplyComparison functions are useful in the Advanced Qualification Editor. ApplySimple may be used in one or both sides of a comparison expression. In ApplyComparison, the custom SQL syntax enclosed in quotation marks represents the entire condition; thus there is no need to compare the result of ApplyComparison to anything else.
 
The following is an example of a valid Advanced Qualification Expression that discovers the difference between today's year and the year of Start_Date in SQL Server:
 
ApplySimple ("datepart(yy, #0)", Start_Date) = ApplySimple ("datepart(yy, getdate())", Start_Date)
With ApplyComparison, the same condition would be written:
 
ApplyComparison ("datepart(yy, #0) = datepart(yy, getdate())", Start_Date)
 


Comment

0 comments

Details

Knowledge Article

Published:

June 8, 2017

Last Updated:

June 8, 2017