Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can someone give me a clearer descr 2

Status
Not open for further replies.

hoohay

Programmer
Jun 25, 2003
22
US
Can someone give me a clearer description of apply simple syntax applysimple("?",?,?)

describe what these values are or could be, what is #0, etc.

Thanks in advance,
 
The applysimple/applycomparison functions are used to bypass the mstr sql engine. So you could put your own customised sql in here, you subsitute the names of the microstrategy objects with #0, #1 and so on depending on how many you have.

The mstr knowledge base will help with some of the syntax - TN5200-7X0-0019

Their simple example here is based on a case statement to find low, high & medium values and give a text display for them.

ApplySimple(" CASE WHEN #0 between 0 and 100000 THEN 'Low' WHEN #0 between 100001 and 200000 THEN 'Med' ELSE 'High' END ", Sum([REG_SLS_DLR])

Here #0 is the sum of the REG_SLS_DLR fact to be evaluated in the case statement.


 
also you can include prompts in the syntax. so in the above example if you have an object prompt called P1, then you can use it in the syntax

ApplySimple(" CASE WHEN #0 between 0 and 100000 THEN 'Low' WHEN #0 between 100001 and 200000 THEN 'Med' ELSE 'High' END ", ?P1)

The report will prompt user to choose the metric that is added to the applysimple dynamically...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top