Posts tagged "sql server 2000"

SSAS: MDX Average Script On SSAS 2008

The MDX script on Microsoft Analysis Service (SSAS) 2008 and 2005 are different from SQL 2000. Here’s an example how to calculate average using MDX script on Analysis Service 2008. SSAS 2008, How to calculate Net Value By Date (NetValue / Date)

Old one, SSAS 2000, How to calculate Net Value By Date (NetValue… Continue reading

Kill a lock process

The last method (workaround) to solve a lock status is by killing the process. Write this line to Kill a process in sql server:

–This is the progress report.spid 55: Transaction rollback in progress. Estimated rollback completion: 70% Estimated time left: 15 seconds.

Multiple IIf Logic Block

IIf function often used in MultiDimensionalExpression (MDX), It’s quiet simple to implement single block of IIf block. This an example of Multiple IIf logic block. Example1:

If…Then..Else… in MultiDimensionalExpression

A logical script in MDX to perform an “If..Then.. Else..” block.

Example1:The following example returns 0 if Measures.CurrentMember is an empty cell, 1 otherwise:

Example2:The following string returns the string “Yes” if Measures.CurrentMember is an empty cell, the string, “No” otherwise:

Example3:

Example4:Average Sales (Measure) By Time Day (Dimension)

Source:… Continue reading

Relative Contribution to Total Value (Percentage)

There’s a few scenario to calculate a percentage of a measure in OLAP CUBE (Analysis Service 2000). A Percentage is common calculation in MDX , and it can be solved by divide a measure to  total value (Grand Total). Sample 1:Measures.[Value Contribution to Total]:

Sample 2:Measures.[Value Contribution to Total]:

Sample 3:Measures.[Product Contribution to… Continue reading