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

KB47171: How to use a selector to limit the date range between the first month of year and the selected month in MicroStrategy 9.x?


Stefan Zepeda

Salesforce Solutions Architect • Strategy


How to use a selector to limit the date range between the first month of year and the selected month in MicroStrategy 9.x?

Users may want to select a month in the selector and have the grid/graph return the date range between the first month of year and the selected month. For example, if June 2010 is chosen in the selector, then the grid/graph returns data from January 2010 to June 2010. The following procedure describes how to implement such selector in Strategy Tutorial project.
 
 
 
 
Month(ID) Less than or equal to Month Selection (ID)
 

ka02R000000kbmdQAA_0EM440000002CLw.jpeg

 
 
 

  • Create a logical view to serve as the lookup table for Month Selection. Use the following SQL statement to define the lookup table:
     

    Sql

    select a11.Year_ID,
              a12.Month_ID as Month_Selection_ID,
    from   Lu_Year a11,
              Lu_Month a12
    where a11.Year_ID=a12.Year_ID


      
    Insert the following Column Objects:
     
    YEAR_ID           Integer  
    MONTH_SELECTION_ID      Integer 
     
    Make sure that YEAR_ID is added by dragging the existing column YEAR_ID from table LU_YEAR. Column MONTH_SELECTION_ID is a manually added column.
     
ka02R000000kbmdQAA_0EM440000002CM4.jpeg
  • Edit Year attribute and check LU_MONTH_SELECTION as the source table for the ID form.
     
ka02R000000kbmdQAA_0EM440000002CM0.jpeg
  • Create a new attribute called 'Month Selection' based on the lookup table LU_MONTH_SELECTION. The attribute has only ID form which is based on column Month_Selection_ID.
ka02R000000kbmdQAA_0EM440000002CLy.jpeg
  • Update Schema.
  • Create a new report with attribute Month and Month Selection.
  • Add report filter and define it to qualify on ID of Month attribute with condition:
  • Create a new dashboard and add the report as dataset. Insert a grid with attribute Month.
  • Create an element selector based on attribute Month Selection and target on the grid.
     
ka02R000000kbmdQAA_0EM440000002CLv.jpeg
  • Run dashboard. When any month is selected, the grid will show months between the first month of current year and the selected month.
     
ka02R000000kbmdQAA_0EM440000002CM2.jpeg

 
 
 
 


Comment

0 comments

Details

Knowledge Article

Published:

June 8, 2017

Last Updated:

June 8, 2017