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

KB6908: How to create a filter that returns a specific number of months after a certain date in MicroStrategy SQL Generation Engine


Community Admin

• Strategy


The following example shows a simple report in MicroStrategy Tutorial that will return the 'n' number of dates after a date that is input by the user in MicroStrategy SQL Generation Engine 

 
The following example shows a simple report in Strategy Tutorial that will return the 'n' number of dates after a date that is input by the user in Strategy SQL Generation Engine 
 
Note: This example includes SQL syntax specific to the Teradata database platform. For other database platforms, the SQL must be modified to use functions that exist in that platform. Consult the documentation for the database platform to determine the correct SQL syntax to use. Also, this syntax is predicated on month IDs being stored in the warehouse as integers consisting of the year number multiplied by 100, plus the month number, e.g. January 2007 = 200701.
 
Objects Needed:
 

 
This layer…is overwritten by these layers…metric object - headersaxis headers, grid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersmetric object - valuesaxis values, grid unit values, all metrics values, report metric values column subtotal values row subtotal valuesaxis - headersgrid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersaxis - valuesgrid unit values, all metrics values, report metric values column subtotal values row subtotal valuesgrid unit - headersall metrics headers, report metric headers, column subtotal headers, row subtotal headersgrid unit - valuesall metrics values, report metric values column subtotal values row subtotal valuesall metrics - headersreport metric headers, column subtotal headersall metrics - valuesreport metric values column subtotal valuesreport metricbanding, column subtotals, row subtotals, thresholdbandingcolumn subtotals, row subtotals, thresholdcolumn subtotalsrow subtotals, thresholdrow subtotalsthresholdreport bordernonethresholdnoneLevelWhat is it?set it here…Notesmetricspecifies a format for a metric regardless of the report it is on.set in the metric editor."all metrics" and "axis" formatting must be set at defaultaxisaffects all units of the axis.format --> rows and columnsgrid unit formatting must be set to defaultgrid unitformatting of individual report items such as attributesgrid units are listed on the Format menu all metricformats the data zone (where the metric values are displayed)format --> all metrics report metricformats an individual metric on a particular reportindividual metrics are listed in the format menu bandingrow or column grouping by colorgrid --> options column subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format -->columns -->subtotal headers or values. to set "grid unit" formatting, select the grid unit from the format menu.row subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format --> rows -->subtotal headers or values. to set "grid unit" formatting, select the ggrid unit from the format menu.overwrites column subtotal formatting where they intersect with row subtotal formattingreport bordercreates a border around the whole reportright-click on the report (but NOT a report object) then select formatting --> report borders thresholdchanges formatting based on returned data.grid --> Thresholdsoverwrites all other layers.Month_IDLast_12_Month200612200612200612200611200612200610200612200609200612200608200612200607200612200606200612200605200612200604200612200603200612200602200612200601200611200611200611200610200611200609200611200608200611200607200611200606200611200605200611200604200611200603200611200602200611200601200611200512......cust_nocust_namecust_ordercust_typeA01John Doe22A02Jane Doe32A02Jane Doe72A03Joe Doe63 Joe Doe33A04Jenny Doe54cust_namemy_valuesJane Doe10Jenny Doe0Joe Doe6John Doe2Conditional primitiveDECODE statementA<BDecode(Sign(A-B), -1, 1, 0)A<=BDecode(Sign(A-B), 1, 0, 1)A>BDecode( Sign(A-B), 1, 1, 0 )A>=BDecode( Sign(A- B), -1, 0, 1 )A=BDecode( A, B, 1, 0 )A between B and CDecode( Sign(A-B), -1, 0, Decode(Sign(A-C), 1, 0, 1 ))A is nullDecode(A,null,1,0)A is not nullDecode(A,null,0,1)A in (B1,B2,...,Bn)Decode(A,B1,1,B2,1,...,Bn,1,0)JobIDSessionIDReportID1YYYYXXXXOBJECT_NAMECREATE_TIMEMOD_TIMETest Report9/21/2007 2:19:04 PM9/21/2007 2:23:23 PMIS_REP_IDIS_SESSION_IDIS_REP_JOB_ID-14YYYY1Column NameColumn ValueIS_REP_ID-14IS_PROJ_ID4IS_REP_GUIDNA>4IS_REP_VERNAIS_REP_NAMEDELETED REPORTIS_REP_DESCREPORT OBJECT ALREADY DELETED IN THE MD REPOSITORYIS_REP_LOCNO LOCATION AVAILABLEEM_ACCESS_ID0EM_OWNER_ID1EM_OWNER_NAMENAEM_CREATE_DATE2000-01-01 00:00:01.000EM_MODIF_DATE2000-01-01 00:00:01.000IS_REP_ABBREVDEL REPEM_HIDDEN_ID0EM_HIDDEN_DESCVISIBLEEM_EXISTS_ID0EM_EXITS_DESCDOES NOT EXISTIS_REPTYPE_IND0Database
TypeHow to ConfigureOther Useful TNHive / ImpalaHow to connect to ImpalaConnecting-to-Hive-on-a-Secured-Cloudera-CDH-5-5-Server

Connecting-to-Impala-on-a-Secured-Cloudera-CDH-5-5


 Spark SQLHow-to-Connect-to-SparkSQLKB318709: The Service Principle Name (SPN) field is greyed out for Kerberos Authentication mode when creating a DSN using the MicroStrategy Apache Spark SQL ODBC Driver in the Windows Data Sources (ODBC) AdministratorTeradataHow to connect to Teradata
 KB320454: How to configure Kerberos pass-through with Teradata for MicroStrategy Intelligence Server 10.6 or higher running on Linux Operating SystemsMSASConnecting to MSASKB319273- "Item 'xxxx_longGUID_xxx' not found" error occurs when attempting to import data from MSAS using pass-through Kerberos authentication with MicroStrategy 10.6SAP Hana
KB43752: How to use Kerberos Authentication with MicroStrategy 9.x and SAP HANA
Using warehouse pass-through with Kerberos Integrated authentication fails against MDX providers using MicroStrategy Web 10.4SQL ServerSteps 3 in KB272948KB33411: How to set up Kerberos (Integrated) authentication against Microsoft SQL Server databases for the MicroStrategy Intelligence Server 9.x and 10.x on Microsoft Windows operating system platformsName: Type:Prompt on value (date)Definition:

 
This layer…is overwritten by these layers…metric object - headersaxis headers, grid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersmetric object - valuesaxis values, grid unit values, all metrics values, report metric values column subtotal values row subtotal valuesaxis - headersgrid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersaxis - valuesgrid unit values, all metrics values, report metric values column subtotal values row subtotal valuesgrid unit - headersall metrics headers, report metric headers, column subtotal headers, row subtotal headersgrid unit - valuesall metrics values, report metric values column subtotal values row subtotal valuesall metrics - headersreport metric headers, column subtotal headersall metrics - valuesreport metric values column subtotal valuesreport metricbanding, column subtotals, row subtotals, thresholdbandingcolumn subtotals, row subtotals, thresholdcolumn subtotalsrow subtotals, thresholdrow subtotalsthresholdreport bordernonethresholdnoneLevelWhat is it?set it here…Notesmetricspecifies a format for a metric regardless of the report it is on.set in the metric editor."all metrics" and "axis" formatting must be set at defaultaxisaffects all units of the axis.format --> rows and columnsgrid unit formatting must be set to defaultgrid unitformatting of individual report items such as attributesgrid units are listed on the Format menu all metricformats the data zone (where the metric values are displayed)format --> all metrics report metricformats an individual metric on a particular reportindividual metrics are listed in the format menu bandingrow or column grouping by colorgrid --> options column subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format -->columns -->subtotal headers or values. to set "grid unit" formatting, select the grid unit from the format menu.row subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format --> rows -->subtotal headers or values. to set "grid unit" formatting, select the ggrid unit from the format menu.overwrites column subtotal formatting where they intersect with row subtotal formattingreport bordercreates a border around the whole reportright-click on the report (but NOT a report object) then select formatting --> report borders thresholdchanges formatting based on returned data.grid --> Thresholdsoverwrites all other layers.Month_IDLast_12_Month200612200612200612200611200612200610200612200609200612200608200612200607200612200606200612200605200612200604200612200603200612200602200612200601200611200611200611200610200611200609200611200608200611200607200611200606200611200605200611200604200611200603200611200602200611200601200611200512......cust_nocust_namecust_ordercust_typeA01John Doe22A02Jane Doe32A02Jane Doe72A03Joe Doe63 Joe Doe33A04Jenny Doe54cust_namemy_valuesJane Doe10Jenny Doe0Joe Doe6John Doe2Conditional primitiveDECODE statementA<BDecode(Sign(A-B), -1, 1, 0)A<=BDecode(Sign(A-B), 1, 0, 1)A>BDecode( Sign(A-B), 1, 1, 0 )A>=BDecode( Sign(A- B), -1, 0, 1 )A=BDecode( A, B, 1, 0 )A between B and CDecode( Sign(A-B), -1, 0, Decode(Sign(A-C), 1, 0, 1 ))A is nullDecode(A,null,1,0)A is not nullDecode(A,null,0,1)A in (B1,B2,...,Bn)Decode(A,B1,1,B2,1,...,Bn,1,0)JobIDSessionIDReportID1YYYYXXXXOBJECT_NAMECREATE_TIMEMOD_TIMETest Report9/21/2007 2:19:04 PM9/21/2007 2:23:23 PMIS_REP_IDIS_SESSION_IDIS_REP_JOB_ID-14YYYY1Column NameColumn ValueIS_REP_ID-14IS_PROJ_ID4IS_REP_GUIDNA>4IS_REP_VERNAIS_REP_NAMEDELETED REPORTIS_REP_DESCREPORT OBJECT ALREADY DELETED IN THE MD REPOSITORYIS_REP_LOCNO LOCATION AVAILABLEEM_ACCESS_ID0EM_OWNER_ID1EM_OWNER_NAMENAEM_CREATE_DATE2000-01-01 00:00:01.000EM_MODIF_DATE2000-01-01 00:00:01.000IS_REP_ABBREVDEL REPEM_HIDDEN_ID0EM_HIDDEN_DESCVISIBLEEM_EXISTS_ID0EM_EXITS_DESCDOES NOT EXISTIS_REPTYPE_IND0Database
TypeHow to ConfigureOther Useful TNHive / ImpalaHow to connect to ImpalaConnecting-to-Hive-on-a-Secured-Cloudera-CDH-5-5-Server

Connecting-to-Impala-on-a-Secured-Cloudera-CDH-5-5


 Spark SQLHow-to-Connect-to-SparkSQLKB318709: The Service Principle Name (SPN) field is greyed out for Kerberos Authentication mode when creating a DSN using the MicroStrategy Apache Spark SQL ODBC Driver in the Windows Data Sources (ODBC) AdministratorTeradataHow to connect to Teradata
 KB320454: How to configure Kerberos pass-through with Teradata for MicroStrategy Intelligence Server 10.6 or higher running on Linux Operating SystemsMSASConnecting to MSASKB319273- "Item 'xxxx_longGUID_xxx' not found" error occurs when attempting to import data from MSAS using pass-through Kerberos authentication with MicroStrategy 10.6SAP Hana
KB43752: How to use Kerberos Authentication with MicroStrategy 9.x and SAP HANA
Using warehouse pass-through with Kerberos Integrated authentication fails against MDX providers using MicroStrategy Web 10.4SQL ServerSteps 3 in KB272948KB33411: How to set up Kerberos (Integrated) authentication against Microsoft SQL Server databases for the MicroStrategy Intelligence Server 9.x and 10.x on Microsoft Windows operating system platformsName: Type:Prompt on value (date)Definition:

 
This layer…is overwritten by these layers…metric object - headersaxis headers, grid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersmetric object - valuesaxis values, grid unit values, all metrics values, report metric values column subtotal values row subtotal valuesaxis - headersgrid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersaxis - valuesgrid unit values, all metrics values, report metric values column subtotal values row subtotal valuesgrid unit - headersall metrics headers, report metric headers, column subtotal headers, row subtotal headersgrid unit - valuesall metrics values, report metric values column subtotal values row subtotal valuesall metrics - headersreport metric headers, column subtotal headersall metrics - valuesreport metric values column subtotal valuesreport metricbanding, column subtotals, row subtotals, thresholdbandingcolumn subtotals, row subtotals, thresholdcolumn subtotalsrow subtotals, thresholdrow subtotalsthresholdreport bordernonethresholdnoneLevelWhat is it?set it here…Notesmetricspecifies a format for a metric regardless of the report it is on.set in the metric editor."all metrics" and "axis" formatting must be set at defaultaxisaffects all units of the axis.format --> rows and columnsgrid unit formatting must be set to defaultgrid unitformatting of individual report items such as attributesgrid units are listed on the Format menu all metricformats the data zone (where the metric values are displayed)format --> all metrics report metricformats an individual metric on a particular reportindividual metrics are listed in the format menu bandingrow or column grouping by colorgrid --> options column subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format -->columns -->subtotal headers or values. to set "grid unit" formatting, select the grid unit from the format menu.row subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format --> rows -->subtotal headers or values. to set "grid unit" formatting, select the ggrid unit from the format menu.overwrites column subtotal formatting where they intersect with row subtotal formattingreport bordercreates a border around the whole reportright-click on the report (but NOT a report object) then select formatting --> report borders thresholdchanges formatting based on returned data.grid --> Thresholdsoverwrites all other layers.Month_IDLast_12_Month200612200612200612200611200612200610200612200609200612200608200612200607200612200606200612200605200612200604200612200603200612200602200612200601200611200611200611200610200611200609200611200608200611200607200611200606200611200605200611200604200611200603200611200602200611200601200611200512......cust_nocust_namecust_ordercust_typeA01John Doe22A02Jane Doe32A02Jane Doe72A03Joe Doe63 Joe Doe33A04Jenny Doe54cust_namemy_valuesJane Doe10Jenny Doe0Joe Doe6John Doe2Conditional primitiveDECODE statementA<BDecode(Sign(A-B), -1, 1, 0)A<=BDecode(Sign(A-B), 1, 0, 1)A>BDecode( Sign(A-B), 1, 1, 0 )A>=BDecode( Sign(A- B), -1, 0, 1 )A=BDecode( A, B, 1, 0 )A between B and CDecode( Sign(A-B), -1, 0, Decode(Sign(A-C), 1, 0, 1 ))A is nullDecode(A,null,1,0)A is not nullDecode(A,null,0,1)A in (B1,B2,...,Bn)Decode(A,B1,1,B2,1,...,Bn,1,0)JobIDSessionIDReportID1YYYYXXXXOBJECT_NAMECREATE_TIMEMOD_TIMETest Report9/21/2007 2:19:04 PM9/21/2007 2:23:23 PMIS_REP_IDIS_SESSION_IDIS_REP_JOB_ID-14YYYY1Column NameColumn ValueIS_REP_ID-14IS_PROJ_ID4IS_REP_GUIDNA>4IS_REP_VERNAIS_REP_NAMEDELETED REPORTIS_REP_DESCREPORT OBJECT ALREADY DELETED IN THE MD REPOSITORYIS_REP_LOCNO LOCATION AVAILABLEEM_ACCESS_ID0EM_OWNER_ID1EM_OWNER_NAMENAEM_CREATE_DATE2000-01-01 00:00:01.000EM_MODIF_DATE2000-01-01 00:00:01.000IS_REP_ABBREVDEL REPEM_HIDDEN_ID0EM_HIDDEN_DESCVISIBLEEM_EXISTS_ID0EM_EXITS_DESCDOES NOT EXISTIS_REPTYPE_IND0Database
TypeHow to ConfigureOther Useful TNHive / ImpalaHow to connect to ImpalaConnecting-to-Hive-on-a-Secured-Cloudera-CDH-5-5-Server

Connecting-to-Impala-on-a-Secured-Cloudera-CDH-5-5


 Spark SQLHow-to-Connect-to-SparkSQLKB318709: The Service Principle Name (SPN) field is greyed out for Kerberos Authentication mode when creating a DSN using the MicroStrategy Apache Spark SQL ODBC Driver in the Windows Data Sources (ODBC) AdministratorTeradataHow to connect to Teradata
 KB320454: How to configure Kerberos pass-through with Teradata for MicroStrategy Intelligence Server 10.6 or higher running on Linux Operating SystemsMSASConnecting to MSASKB319273- "Item 'xxxx_longGUID_xxx' not found" error occurs when attempting to import data from MSAS using pass-through Kerberos authentication with MicroStrategy 10.6SAP Hana
KB43752: How to use Kerberos Authentication with MicroStrategy 9.x and SAP HANA
Using warehouse pass-through with Kerberos Integrated authentication fails against MDX providers using MicroStrategy Web 10.4SQL ServerSteps 3 in KB272948KB33411: How to set up Kerberos (Integrated) authentication against Microsoft SQL Server databases for the MicroStrategy Intelligence Server 9.x and 10.x on Microsoft Windows operating system platformsName: Type:Prompt on value (date)Definition:

 
This layer…is overwritten by these layers…metric object - headersaxis headers, grid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersmetric object - valuesaxis values, grid unit values, all metrics values, report metric values column subtotal values row subtotal valuesaxis - headersgrid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersaxis - valuesgrid unit values, all metrics values, report metric values column subtotal values row subtotal valuesgrid unit - headersall metrics headers, report metric headers, column subtotal headers, row subtotal headersgrid unit - valuesall metrics values, report metric values column subtotal values row subtotal valuesall metrics - headersreport metric headers, column subtotal headersall metrics - valuesreport metric values column subtotal valuesreport metricbanding, column subtotals, row subtotals, thresholdbandingcolumn subtotals, row subtotals, thresholdcolumn subtotalsrow subtotals, thresholdrow subtotalsthresholdreport bordernonethresholdnoneLevelWhat is it?set it here…Notesmetricspecifies a format for a metric regardless of the report it is on.set in the metric editor."all metrics" and "axis" formatting must be set at defaultaxisaffects all units of the axis.format --> rows and columnsgrid unit formatting must be set to defaultgrid unitformatting of individual report items such as attributesgrid units are listed on the Format menu all metricformats the data zone (where the metric values are displayed)format --> all metrics report metricformats an individual metric on a particular reportindividual metrics are listed in the format menu bandingrow or column grouping by colorgrid --> options column subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format -->columns -->subtotal headers or values. to set "grid unit" formatting, select the grid unit from the format menu.row subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format --> rows -->subtotal headers or values. to set "grid unit" formatting, select the ggrid unit from the format menu.overwrites column subtotal formatting where they intersect with row subtotal formattingreport bordercreates a border around the whole reportright-click on the report (but NOT a report object) then select formatting --> report borders thresholdchanges formatting based on returned data.grid --> Thresholdsoverwrites all other layers.Month_IDLast_12_Month200612200612200612200611200612200610200612200609200612200608200612200607200612200606200612200605200612200604200612200603200612200602200612200601200611200611200611200610200611200609200611200608200611200607200611200606200611200605200611200604200611200603200611200602200611200601200611200512......cust_nocust_namecust_ordercust_typeA01John Doe22A02Jane Doe32A02Jane Doe72A03Joe Doe63 Joe Doe33A04Jenny Doe54cust_namemy_valuesJane Doe10Jenny Doe0Joe Doe6John Doe2Conditional primitiveDECODE statementA<BDecode(Sign(A-B), -1, 1, 0)A<=BDecode(Sign(A-B), 1, 0, 1)A>BDecode( Sign(A-B), 1, 1, 0 )A>=BDecode( Sign(A- B), -1, 0, 1 )A=BDecode( A, B, 1, 0 )A between B and CDecode( Sign(A-B), -1, 0, Decode(Sign(A-C), 1, 0, 1 ))A is nullDecode(A,null,1,0)A is not nullDecode(A,null,0,1)A in (B1,B2,...,Bn)Decode(A,B1,1,B2,1,...,Bn,1,0)JobIDSessionIDReportID1YYYYXXXXOBJECT_NAMECREATE_TIMEMOD_TIMETest Report9/21/2007 2:19:04 PM9/21/2007 2:23:23 PMIS_REP_IDIS_SESSION_IDIS_REP_JOB_ID-14YYYY1Column NameColumn ValueIS_REP_ID-14IS_PROJ_ID4IS_REP_GUIDNA>4IS_REP_VERNAIS_REP_NAMEDELETED REPORTIS_REP_DESCREPORT OBJECT ALREADY DELETED IN THE MD REPOSITORYIS_REP_LOCNO LOCATION AVAILABLEEM_ACCESS_ID0EM_OWNER_ID1EM_OWNER_NAMENAEM_CREATE_DATE2000-01-01 00:00:01.000EM_MODIF_DATE2000-01-01 00:00:01.000IS_REP_ABBREVDEL REPEM_HIDDEN_ID0EM_HIDDEN_DESCVISIBLEEM_EXISTS_ID0EM_EXITS_DESCDOES NOT EXISTIS_REPTYPE_IND0Database
TypeHow to ConfigureOther Useful TNHive / ImpalaHow to connect to ImpalaConnecting-to-Hive-on-a-Secured-Cloudera-CDH-5-5-Server

Connecting-to-Impala-on-a-Secured-Cloudera-CDH-5-5


 Spark SQLHow-to-Connect-to-SparkSQLKB318709: The Service Principle Name (SPN) field is greyed out for Kerberos Authentication mode when creating a DSN using the MicroStrategy Apache Spark SQL ODBC Driver in the Windows Data Sources (ODBC) AdministratorTeradataHow to connect to Teradata
 KB320454: How to configure Kerberos pass-through with Teradata for MicroStrategy Intelligence Server 10.6 or higher running on Linux Operating SystemsMSASConnecting to MSASKB319273- "Item 'xxxx_longGUID_xxx' not found" error occurs when attempting to import data from MSAS using pass-through Kerberos authentication with MicroStrategy 10.6SAP Hana
KB43752: How to use Kerberos Authentication with MicroStrategy 9.x and SAP HANA
Using warehouse pass-through with Kerberos Integrated authentication fails against MDX providers using MicroStrategy Web 10.4SQL ServerSteps 3 in KB272948KB33411: How to set up Kerberos (Integrated) authentication against Microsoft SQL Server databases for the MicroStrategy Intelligence Server 9.x and 10.x on Microsoft Windows operating system platformsName: Type:Prompt on value (date)Definition:

 
This layer…is overwritten by these layers…metric object - headersaxis headers, grid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersmetric object - valuesaxis values, grid unit values, all metrics values, report metric values column subtotal values row subtotal valuesaxis - headersgrid unit headers, all metrics headers, report metric headers, column subtotal headers, row subtotal headersaxis - valuesgrid unit values, all metrics values, report metric values column subtotal values row subtotal valuesgrid unit - headersall metrics headers, report metric headers, column subtotal headers, row subtotal headersgrid unit - valuesall metrics values, report metric values column subtotal values row subtotal valuesall metrics - headersreport metric headers, column subtotal headersall metrics - valuesreport metric values column subtotal valuesreport metricbanding, column subtotals, row subtotals, thresholdbandingcolumn subtotals, row subtotals, thresholdcolumn subtotalsrow subtotals, thresholdrow subtotalsthresholdreport bordernonethresholdnoneLevelWhat is it?set it here…Notesmetricspecifies a format for a metric regardless of the report it is on.set in the metric editor."all metrics" and "axis" formatting must be set at defaultaxisaffects all units of the axis.format --> rows and columnsgrid unit formatting must be set to defaultgrid unitformatting of individual report items such as attributesgrid units are listed on the Format menu all metricformats the data zone (where the metric values are displayed)format --> all metrics report metricformats an individual metric on a particular reportindividual metrics are listed in the format menu bandingrow or column grouping by colorgrid --> options column subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format -->columns -->subtotal headers or values. to set "grid unit" formatting, select the grid unit from the format menu.row subtotalscan be applied either as "zone" or "grid unit" formatting. "grid unit" formatting moves with the subtotals while "zone" is based on location.to set "zone" formatting, select format --> rows -->subtotal headers or values. to set "grid unit" formatting, select the ggrid unit from the format menu.overwrites column subtotal formatting where they intersect with row subtotal formattingreport bordercreates a border around the whole reportright-click on the report (but NOT a report object) then select formatting --> report borders thresholdchanges formatting based on returned data.grid --> Thresholdsoverwrites all other layers.Month_IDLast_12_Month200612200612200612200611200612200610200612200609200612200608200612200607200612200606200612200605200612200604200612200603200612200602200612200601200611200611200611200610200611200609200611200608200611200607200611200606200611200605200611200604200611200603200611200602200611200601200611200512......cust_nocust_namecust_ordercust_typeA01John Doe22A02Jane Doe32A02Jane Doe72A03Joe Doe63 Joe Doe33A04Jenny Doe54cust_namemy_valuesJane Doe10Jenny Doe0Joe Doe6John Doe2Conditional primitiveDECODE statementA<BDecode(Sign(A-B), -1, 1, 0)A<=BDecode(Sign(A-B), 1, 0, 1)A>BDecode( Sign(A-B), 1, 1, 0 )A>=BDecode( Sign(A- B), -1, 0, 1 )A=BDecode( A, B, 1, 0 )A between B and CDecode( Sign(A-B), -1, 0, Decode(Sign(A-C), 1, 0, 1 ))A is nullDecode(A,null,1,0)A is not nullDecode(A,null,0,1)A in (B1,B2,...,Bn)Decode(A,B1,1,B2,1,...,Bn,1,0)JobIDSessionIDReportID1YYYYXXXXOBJECT_NAMECREATE_TIMEMOD_TIMETest Report9/21/2007 2:19:04 PM9/21/2007 2:23:23 PMIS_REP_IDIS_SESSION_IDIS_REP_JOB_ID-14YYYY1Column NameColumn ValueIS_REP_ID-14IS_PROJ_ID4IS_REP_GUIDNA>4IS_REP_VERNAIS_REP_NAMEDELETED REPORTIS_REP_DESCREPORT OBJECT ALREADY DELETED IN THE MD REPOSITORYIS_REP_LOCNO LOCATION AVAILABLEEM_ACCESS_ID0EM_OWNER_ID1EM_OWNER_NAMENAEM_CREATE_DATE2000-01-01 00:00:01.000EM_MODIF_DATE2000-01-01 00:00:01.000IS_REP_ABBREVDEL REPEM_HIDDEN_ID0EM_HIDDEN_DESCVISIBLEEM_EXISTS_ID0EM_EXITS_DESCDOES NOT EXISTIS_REPTYPE_IND0Database
TypeHow to ConfigureOther Useful TNHive / ImpalaHow to connect to ImpalaConnecting-to-Hive-on-a-Secured-Cloudera-CDH-5-5-Server

Connecting-to-Impala-on-a-Secured-Cloudera-CDH-5-5


 Spark SQLHow-to-Connect-to-SparkSQLKB318709: The Service Principle Name (SPN) field is greyed out for Kerberos Authentication mode when creating a DSN using the MicroStrategy Apache Spark SQL ODBC Driver in the Windows Data Sources (ODBC) AdministratorTeradataHow to connect to Teradata
 KB320454: How to configure Kerberos pass-through with Teradata for MicroStrategy Intelligence Server 10.6 or higher running on Linux Operating SystemsMSASConnecting to MSASKB319273- "Item 'xxxx_longGUID_xxx' not found" error occurs when attempting to import data from MSAS using pass-through Kerberos authentication with MicroStrategy 10.6SAP Hana
KB43752: How to use Kerberos Authentication with MicroStrategy 9.x and SAP HANA
Using warehouse pass-through with Kerberos Integrated authentication fails against MDX providers using MicroStrategy Web 10.4SQL ServerSteps 3 in KB272948KB33411: How to set up Kerberos (Integrated) authentication against Microsoft SQL Server databases for the MicroStrategy Intelligence Server 9.x and 10.x on Microsoft Windows operating system platformsName: Type:Prompt on value (date)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:Prompt on value (numeric)Definition:


Name: Type:FilterDefinition:


Name: Type:FilterDefinition:


Name: Type:FilterDefinition:


Name: Type:FilterDefinition:


Name: Type:FilterDefinition:


Name: Type:FilterDefinition:

Month ID Between

 
ApplySimple("(EXTRACT(YEAR FROM #0) * 100 + EXTRACT(MONTH FROM #0))",? DP)

 

AND

ApplySimple("(EXTRACT(YEAR FROM ADD_MONTHS(#0, #1)) * 100 + EXTRACT(MONTH FROM ADD_MONTHS(#0, #1)))",? DP,? NP)

 
Name: Type:ReportDefinition:

 
Name: Type:ReportDefinition:

 
Name: Type:ReportDefinition:

 
Name: Type:ReportDefinition:

 
Name: Type:ReportDefinition:

 
Name: Type:ReportDefinition:


 
 
When the report executes, it will prompt twice, once for the date and once for the number of months. In this case, the prompt on date was answered with '1997/05/29' and the prompt on the number of months was answered with '6'. The Strategy SQL Generation Engine will generate the following SQL:
select a11.Month_Id Month_Id,
    a11.MONTH_DESC MONTH_DESC
from   joe.LU_MONTH a11
where
      a11.Month_Id between
  (EXTRACT(YEAR FROM '1997/05/29') * 100 +
  EXTRACT(MONTH FROM '1997/05/29'))
and
  (EXTRACT(YEAR FROM ADD_MONTHS('1997/05/29', 6)) * 100 +
  EXTRACT(MONTH FROM ADD_MONTHS('1997/05/29', 6)))
 
In Teradata, the Extract function returns the month, day or year from a date field. Using this function and given the format in which the column is stored in the Strategy Tutorial (Vmall) warehouse (integer, YYYYMM), the formula will extract the year from the date prompt, multiply it by 100 and add the day number to it, giving it the desired format. The ADD_MONTHS function in Teradata, adds 'n' number of months to a date field. In this case 6.
 
The results for the report are the following:

ka04W000000OhiZQAS_0EM440000002GAq.gif

 
 
For more information about database pass-through functions, please see the Strategy Knowledge Base document
KB3905 - How to use pass-through expression- ApplySimple in Strategy SQL Generation Engine 9.x
 


Comment

0 comments

Details

Knowledge Article

Published:

April 20, 2017

Last Updated:

April 20, 2017