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

KB10471: How to create a dynamic prompt and resolve it to N days subtracted or added from a specific day in the current week in MicroStrategy 9.x and 10.x


Stefan Zepeda

Salesforce Solutions Architect • Strategy


This document describes how to create a dynamic prompt and resolve it to N days subtracted or added from a specific day in the current week in Strategy 9.x and 10.x. This document also provides some guidance on reading the dynamic date editor.
 
The dynamic date editor is always based on the current day's date, so it is the first part to be resolved in the "formula." For example, consider the following dynamic date definition:

ka02R000000kbd5QAA_0EM440000002Fsx.jpeg

 
The correct way of reading this is:
 
"The Wednesday of the week of (today minus 5 days)." So if today was August 25, 2004 (Wednesday), today minus 5 days would be August 20, 2004 and from there you would take the Wednesday of that week, which is August 18, 2004.
 
In the case that users want to have the Wednesday of this Week as the starting point and subtract 5 days from it, perform the following:
 

  • Create a date value prompt and have the default value set to "This Week". Select Wednesday and leave other fields as the defaults, as shown below:
ka02R000000kbd5QAA_0EM440000002Fsl.jpeg
  • Create a filter with an attribute form qualification on the date form. Compare the attribute's date to the following Custom expression:
    ApplySimple("#0",AddDays(?, -5))
ka02R000000kbd5QAA_0EM440000002Fsi.gif
  • Save the filter and to verify, insert the filter into a report with the Date attribute to the template.

Execute the report and notice that the value returned is the current week's day - 5 days:

ka02R000000kbd5QAA_0EM440000002Fsz.jpeg

 


Comment

0 comments

Details

Knowledge Article

Published:

June 13, 2017

Last Updated:

June 13, 2017