Showing posts with label analysis. Show all posts
Showing posts with label analysis. Show all posts

Monday, March 19, 2012

ASExecutionLog ?

Is there a tool for Analysis Services that acts like the RSExecutionLog database for Reporting Services? Basically, I'm looking for out of the box functionality to save off the OlapQueryLog records into a different db similar to what is available for Reporting Services.

have you ever seen this?

http://www.databasejournal.com/features/mssql/article.php/10894_3618581_3
|||

Thanks for the reply. Perhaps the OlapQueryLog is not the ideal place to find the functionality I'm looking for. I'm looking for something similar to what is offered with Reporting Services and the RSExecutionLog database to capture who is hitting the cubes and what their requests are.

|||

There is not exactly the same functionality, but you could probably get similar functionality using a trace. If you are just after recent activity there is the automatic flight recorder trace, but this only has a recent window of activity. If you want more control over what data is captured and how long the data is retained, then you would want to setup your own trace.

Ideally you would not want the hassle or overhead of continuously running the Profiler UI somewhere. I have not explored the options with unattended traces to be sure what is possible here. Judging by the output of a DISCOVER_TRACES call it should be possible to get SSAS to dump to a file which you could read in later with SSIS. You might need to use XMLA or AMO to create these traces, I could not see a way to do it from Profiler. I don't think you can get SSAS to dump directly to a SQL table directly, you would need to write an application to listen for the trace events and then write them out if you needed this type of functionality. With AMO, it's not too hard to write your own trace listener.

Thursday, March 8, 2012

AS2005 Cognos Power Play 8

Has anyone managed to use Cognos against Analysis Service 2005 cube? If so any help or point of reference welcome!

Thanks

Sutha

Hi Sutha,

No direct experience I'm afraid but I was talking to Allan Mitchell last night (and where were you, eh?) and he mentioned that he'd had Cognos people in to do a PoC on one of his AS2005 cubes and they were unable to get it to work properly either. Drop him a mail and he might be able to fill you in with the details.

Chris

|||

Since I'm also interested in finding out how well Cognos 8 leverages the AS 2005 feature set, I've Googled some relevent yet "only slightly better than nothing yet" findings this morning, and I'm posting summaries and links here...

Cognos Link to 7/11/07 article indicating Cognos 8 Controller 8.2 Software Environments
Updated: July 11, 2007 ... support of AS 2005 SP2, is listed by Cognos as "compatible", meaning partially tested by Cognos and/or tested or asserted by a Cognos Partner (vs. "Active" (fully tested and supported) or "not supported").

http://support.cognos.com/en/support/products/controller82_software_environments.html

Older Cognos Link to 7/11/2006 article indicating Cognos 8 MR2 does (at least at time of article) [or did] NOT SUPPORT SSAS 2005 cubes. http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html#olap

Request Feedback from Anyone Directly Experienced in Attempting to Connect Cognos 8 with AS2005 Cubes.

As an AS2005 worker (not Cognos), I'm keen to hear how well Cognos' 8's reporting and/or "downstream-from-OLAP" analytics environment can leverage the AS2005 feature set. It's scary not seeing an "Active" (fully tested, Cognos-approved) rating by Cognos in the above link.

Daniel Upton

www.decisionlab.net

|||

Hello! I have came across some implementatiions of Cognos on top of SQL Server 2000 and SQL 2005.

My conclusions are:

Cognos work best with its own cubes, read Transformer. The support for AS2000 cubes, last year, did not include named sets, six years after the release of AS2000, The support for SSAS2005 was nonexistent.

Cognos supplies products on top of other suppliers RDBMS products and is very frequently bought by customers that do not know that SQL Server 2005 includes SSAS2005 and SSRS2005. I have seen customers who have bought SQL Server 2005 and wasted money on Cognos 8 on top of that.

|||I don't know if you mean how to use Powerplay against an AS Cube, but this is from a link from cognos support on how to use AS2k5 as a datasource.

I don't have a Cognos Series8 install here to test this with, and it surely didn't work in Series 7 . Not that i was expecting it to..

Title:

How to use Microsoft Analysis Services 2005 Cubes in Cognos 8.2

Document#:

1031921.1

Updated:

Jun 21, 2007

Applies To:

Cognos 8 BI Analysis Studio 8.2 | Cognos 8 BI Cognos Connection 8.1 | Cognos 8 BI Framework Manager 8.2

Cases:

3

Collection:

KB


Description:

How to setup Microsoft Analysis Services 2005 Cubes in Cognos 8.2 as Data Source

Environment:

Win 2003 Standard Edition/ Enterprise Edition, SQL Server 2005 (SP2), Cognos 8.2

Steps:

Run the Cognos 8 service as a Domain Account (ie Cognos_service)
Add (Cognos_service) to SQLServer2005MSOLAPUser$<server_name>$<instance_name> Group on the machine running SQL Server 2005
Add (Cognos_service) to the role for under the database running the Analysis Service Cube
(Open MS Server Managerment Studio > Login to Analysis Services Server > Open the Database running the cube > Create a Role and assign read access to at least one cube inside the database and add (Cognos-service) to the role).
Go to Cognos Connection > Tools > Data Source > New Data Source > Name the Data source > Type ( Analysis Service 2005 ) > Host Name <Enter the host name of SQL Server 2005> > Named Instance <Enter the Instance Name of SQL Server>

{ If you don't have a defined instance leave this field blank. To check the instance name logon to MS Server Management Studio. Expected format

<Host Name>\ <Instance Name> ( MS Analysis Server 9.00.XXX ) - <Host Name>\< user name>.}
Choose the connection Type ( Cognos8 Credentials or External Namespace)
Test the connection.
Finish|||Oh, scratch that, i guess you were looking to use PP, guess i should have read the topic, and not the post Stick out tongue
|||

Chris,

Actually, if you were describing how to connect the Cognos reporting environment (with which I'm not familiar) to an AS2005 cube, then that is relevent. I don't currently plan to use a PP cube. Thx.

Of course, just connecting from Cognos does not mean that Cognos really leverages the AS2005 feature set, right? On that note, do you have any feedback on that question?

|||

OK. You're confirming my suspicions, which is helpful. Thanks, Thomas.

However, Cognos' support of AS2005 SP2 was quoted as "compatible" on the Cognos site (link is on my initial post on this thread.

Has anybody at MSDN has seen this alleged Cognos "compatible" support of AS2005 SP2 in action? If so, how did it do?

Daniel Upton

www.decisionlab.net

|||

According to this page AS2005 is still not supported:

http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html

MSSQL Server Analysis Services 2005

Not Supported

Not Supported

I supect that the support, when it arrives, will be limited for business logic, like named sets, because PP have it own calculation engine for that. Their strategy is to use other suppliers cubes as nothing more than data stores and keep the business logic inside its own products.

Regards

Thomas Ivarsson

|||

Interesting. So, let's suppose for a moment that Cognos 8's interface has great capabilities to build, on a raw AS2005 cube, with queries, calculated members, named sets, KPI's, by visual interface and/or MDX -- and create dashboards, reports, etc. Finally, let's also assume that no cube transactions or actions are necessary. In this context, what really bad limitations will be encountered by, say a legacy Cognos Team newly implementing AS2005, with doing that biz logic outside of BIDS and Analysis Svcs? Let's also suppose here that no cube translations or actions are necessary.

|||

No limitations except that all your business logic will reside in Cognos and you are unable to use tools from different suppliers. This strategy is almost the same as ProClarity have used except that ProClarity supports business logic in AS2005(MDX scipts) and provide its own tools for that.

And when organizations and business migrate to Office 2007, Excel 2007 will support SSAS2005 features.

Regards

Thomas Ivarsson

|||

I totally agree with you on that. Thanks very much, Thomas, for the extended dialogue. Very helpful!

Daniel Upton

|||Cognos 8.2 supports AS2005 SP2 and AS2000 as a datasource. I have implemented that at our site. Yes you don't need cognos once you have SQL Server. But sometime politics plays a role.

Best Regards
|||

Hello Jason,

Yes Cognos8 work on SSAS, but performance are very slowly, and nothing to help for this problem, Cognos say look at MS, and Ms don't say nothing.

Why an Excel is 10 time faster than Cognos 8 analysis studio when we are querying an SSAS CUBE?

Customer are nos so happy at end !!!

pascal

|||

Hello Chris.

I use Cognos 8 with SQL2000 cube, and with SQL2005 cube,

the main problems are :

1 - to publish SSAS cube we use Framework Manager and we can't add filters, properties, calculations.

2 - Performance are incredible, i say 10 time slower than Excel or Cube Browser, and we have nothing to help .

3 - Sometime i try to play with Reporting Services, but customer's say "i'ts not standard !"

Any idea to check performance at all levels ?

Merci de Suisse .

AS2005 Cognos Power Play 8

Has anyone managed to use Cognos against Analysis Service 2005 cube? If so any help or point of reference welcome!

Thanks

Sutha

Hi Sutha,

No direct experience I'm afraid but I was talking to Allan Mitchell last night (and where were you, eh?) and he mentioned that he'd had Cognos people in to do a PoC on one of his AS2005 cubes and they were unable to get it to work properly either. Drop him a mail and he might be able to fill you in with the details.

Chris

|||

Since I'm also interested in finding out how well Cognos 8 leverages the AS 2005 feature set, I've Googled some relevent yet "only slightly better than nothing yet" findings this morning, and I'm posting summaries and links here...

Cognos Link to 7/11/07 article indicating Cognos 8 Controller 8.2 Software Environments
Updated: July 11, 2007 ... support of AS 2005 SP2, is listed by Cognos as "compatible", meaning partially tested by Cognos and/or tested or asserted by a Cognos Partner (vs. "Active" (fully tested and supported) or "not supported").

http://support.cognos.com/en/support/products/controller82_software_environments.html

Older Cognos Link to 7/11/2006 article indicating Cognos 8 MR2 does (at least at time of article) [or did] NOT SUPPORT SSAS 2005 cubes. http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html#olap

Request Feedback from Anyone Directly Experienced in Attempting to Connect Cognos 8 with AS2005 Cubes.

As an AS2005 worker (not Cognos), I'm keen to hear how well Cognos' 8's reporting and/or "downstream-from-OLAP" analytics environment can leverage the AS2005 feature set. It's scary not seeing an "Active" (fully tested, Cognos-approved) rating by Cognos in the above link.

Daniel Upton

www.decisionlab.net

|||

Hello! I have came across some implementatiions of Cognos on top of SQL Server 2000 and SQL 2005.

My conclusions are:

Cognos work best with its own cubes, read Transformer. The support for AS2000 cubes, last year, did not include named sets, six years after the release of AS2000, The support for SSAS2005 was nonexistent.

Cognos supplies products on top of other suppliers RDBMS products and is very frequently bought by customers that do not know that SQL Server 2005 includes SSAS2005 and SSRS2005. I have seen customers who have bought SQL Server 2005 and wasted money on Cognos 8 on top of that.

|||I don't know if you mean how to use Powerplay against an AS Cube, but this is from a link from cognos support on how to use AS2k5 as a datasource.

I don't have a Cognos Series8 install here to test this with, and it surely didn't work in Series 7 . Not that i was expecting it to..

Title:

How to use Microsoft Analysis Services 2005 Cubes in Cognos 8.2

Document#:

1031921.1

Updated:

Jun 21, 2007

Applies To:

Cognos 8 BI Analysis Studio 8.2 | Cognos 8 BI Cognos Connection 8.1 | Cognos 8 BI Framework Manager 8.2

Cases:

3

Collection:

KB


Description:

How to setup Microsoft Analysis Services 2005 Cubes in Cognos 8.2 as Data Source

Environment:

Win 2003 Standard Edition/ Enterprise Edition, SQL Server 2005 (SP2), Cognos 8.2

Steps:

Run the Cognos 8 service as a Domain Account (ie Cognos_service)
Add (Cognos_service) to SQLServer2005MSOLAPUser$<server_name>$<instance_name> Group on the machine running SQL Server 2005
Add (Cognos_service) to the role for under the database running the Analysis Service Cube
(Open MS Server Managerment Studio > Login to Analysis Services Server > Open the Database running the cube > Create a Role and assign read access to at least one cube inside the database and add (Cognos-service) to the role).
Go to Cognos Connection > Tools > Data Source > New Data Source > Name the Data source > Type ( Analysis Service 2005 ) > Host Name <Enter the host name of SQL Server 2005> > Named Instance <Enter the Instance Name of SQL Server>

{ If you don't have a defined instance leave this field blank. To check the instance name logon to MS Server Management Studio. Expected format

<Host Name>\ <Instance Name> ( MS Analysis Server 9.00.XXX ) - <Host Name>\< user name>.}
Choose the connection Type ( Cognos8 Credentials or External Namespace)
Test the connection.
Finish|||Oh, scratch that, i guess you were looking to use PP, guess i should have read the topic, and not the post Stick out tongue
|||

Chris,

Actually, if you were describing how to connect the Cognos reporting environment (with which I'm not familiar) to an AS2005 cube, then that is relevent. I don't currently plan to use a PP cube. Thx.

Of course, just connecting from Cognos does not mean that Cognos really leverages the AS2005 feature set, right? On that note, do you have any feedback on that question?

|||

OK. You're confirming my suspicions, which is helpful. Thanks, Thomas.

However, Cognos' support of AS2005 SP2 was quoted as "compatible" on the Cognos site (link is on my initial post on this thread.

Has anybody at MSDN has seen this alleged Cognos "compatible" support of AS2005 SP2 in action? If so, how did it do?

Daniel Upton

www.decisionlab.net

|||

According to this page AS2005 is still not supported:

http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html

MSSQL Server Analysis Services 2005

Not Supported

Not Supported

I supect that the support, when it arrives, will be limited for business logic, like named sets, because PP have it own calculation engine for that. Their strategy is to use other suppliers cubes as nothing more than data stores and keep the business logic inside its own products.

Regards

Thomas Ivarsson

|||

Interesting. So, let's suppose for a moment that Cognos 8's interface has great capabilities to build, on a raw AS2005 cube, with queries, calculated members, named sets, KPI's, by visual interface and/or MDX -- and create dashboards, reports, etc. Finally, let's also assume that no cube transactions or actions are necessary. In this context, what really bad limitations will be encountered by, say a legacy Cognos Team newly implementing AS2005, with doing that biz logic outside of BIDS and Analysis Svcs? Let's also suppose here that no cube translations or actions are necessary.

|||

No limitations except that all your business logic will reside in Cognos and you are unable to use tools from different suppliers. This strategy is almost the same as ProClarity have used except that ProClarity supports business logic in AS2005(MDX scipts) and provide its own tools for that.

And when organizations and business migrate to Office 2007, Excel 2007 will support SSAS2005 features.

Regards

Thomas Ivarsson

|||

I totally agree with you on that. Thanks very much, Thomas, for the extended dialogue. Very helpful!

Daniel Upton

|||Cognos 8.2 supports AS2005 SP2 and AS2000 as a datasource. I have implemented that at our site. Yes you don't need cognos once you have SQL Server. But sometime politics plays a role.

Best Regards
|||

Hello Jason,

Yes Cognos8 work on SSAS, but performance are very slowly, and nothing to help for this problem, Cognos say look at MS, and Ms don't say nothing.

Why an Excel is 10 time faster than Cognos 8 analysis studio when we are querying an SSAS CUBE?

Customer are nos so happy at end !!!

pascal

|||

Hello Chris.

I use Cognos 8 with SQL2000 cube, and with SQL2005 cube,

the main problems are :

1 - to publish SSAS cube we use Framework Manager and we can't add filters, properties, calculations.

2 - Performance are incredible, i say 10 time slower than Excel or Cube Browser, and we have nothing to help .

3 - Sometime i try to play with Reporting Services, but customer's say "i'ts not standard !"

Any idea to check performance at all levels ?

Merci de Suisse .

AS2005 Cognos Power Play 8

Has anyone managed to use Cognos against Analysis Service 2005 cube? If so any help or point of reference welcome!

Thanks

Sutha

Hi Sutha,

No direct experience I'm afraid but I was talking to Allan Mitchell last night (and where were you, eh?) and he mentioned that he'd had Cognos people in to do a PoC on one of his AS2005 cubes and they were unable to get it to work properly either. Drop him a mail and he might be able to fill you in with the details.

Chris

|||

Since I'm also interested in finding out how well Cognos 8 leverages the AS 2005 feature set, I've Googled some relevent yet "only slightly better than nothing yet" findings this morning, and I'm posting summaries and links here...

Cognos Link to 7/11/07 article indicating Cognos 8 Controller 8.2 Software Environments
Updated: July 11, 2007 ... support of AS 2005 SP2, is listed by Cognos as "compatible", meaning partially tested by Cognos and/or tested or asserted by a Cognos Partner (vs. "Active" (fully tested and supported) or "not supported").

http://support.cognos.com/en/support/products/controller82_software_environments.html

Older Cognos Link to 7/11/2006 article indicating Cognos 8 MR2 does (at least at time of article) [or did] NOT SUPPORT SSAS 2005 cubes. http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html#olap

Request Feedback from Anyone Directly Experienced in Attempting to Connect Cognos 8 with AS2005 Cubes.

As an AS2005 worker (not Cognos), I'm keen to hear how well Cognos' 8's reporting and/or "downstream-from-OLAP" analytics environment can leverage the AS2005 feature set. It's scary not seeing an "Active" (fully tested, Cognos-approved) rating by Cognos in the above link.

Daniel Upton

www.decisionlab.net

|||

Hello! I have came across some implementatiions of Cognos on top of SQL Server 2000 and SQL 2005.

My conclusions are:

Cognos work best with its own cubes, read Transformer. The support for AS2000 cubes, last year, did not include named sets, six years after the release of AS2000, The support for SSAS2005 was nonexistent.

Cognos supplies products on top of other suppliers RDBMS products and is very frequently bought by customers that do not know that SQL Server 2005 includes SSAS2005 and SSRS2005. I have seen customers who have bought SQL Server 2005 and wasted money on Cognos 8 on top of that.

|||I don't know if you mean how to use Powerplay against an AS Cube, but this is from a link from cognos support on how to use AS2k5 as a datasource.

I don't have a Cognos Series8 install here to test this with, and it surely didn't work in Series 7 . Not that i was expecting it to..

Title:

How to use Microsoft Analysis Services 2005 Cubes in Cognos 8.2

Document#:

1031921.1

Updated:

Jun 21, 2007

Applies To:

Cognos 8 BI Analysis Studio 8.2 | Cognos 8 BI Cognos Connection 8.1 | Cognos 8 BI Framework Manager 8.2

Cases:

3

Collection:

KB


Description:

How to setup Microsoft Analysis Services 2005 Cubes in Cognos 8.2 as Data Source

Environment:

Win 2003 Standard Edition/ Enterprise Edition, SQL Server 2005 (SP2), Cognos 8.2

Steps:

Run the Cognos 8 service as a Domain Account (ie Cognos_service)
Add (Cognos_service) to SQLServer2005MSOLAPUser$<server_name>$<instance_name> Group on the machine running SQL Server 2005
Add (Cognos_service) to the role for under the database running the Analysis Service Cube
(Open MS Server Managerment Studio > Login to Analysis Services Server > Open the Database running the cube > Create a Role and assign read access to at least one cube inside the database and add (Cognos-service) to the role).
Go to Cognos Connection > Tools > Data Source > New Data Source > Name the Data source > Type ( Analysis Service 2005 ) > Host Name <Enter the host name of SQL Server 2005> > Named Instance <Enter the Instance Name of SQL Server>

{ If you don't have a defined instance leave this field blank. To check the instance name logon to MS Server Management Studio. Expected format

<Host Name>\ <Instance Name> ( MS Analysis Server 9.00.XXX ) - <Host Name>\< user name>.}
Choose the connection Type ( Cognos8 Credentials or External Namespace)
Test the connection.
Finish|||Oh, scratch that, i guess you were looking to use PP, guess i should have read the topic, and not the post Stick out tongue
|||

Chris,

Actually, if you were describing how to connect the Cognos reporting environment (with which I'm not familiar) to an AS2005 cube, then that is relevent. I don't currently plan to use a PP cube. Thx.

Of course, just connecting from Cognos does not mean that Cognos really leverages the AS2005 feature set, right? On that note, do you have any feedback on that question?

|||

OK. You're confirming my suspicions, which is helpful. Thanks, Thomas.

However, Cognos' support of AS2005 SP2 was quoted as "compatible" on the Cognos site (link is on my initial post on this thread.

Has anybody at MSDN has seen this alleged Cognos "compatible" support of AS2005 SP2 in action? If so, how did it do?

Daniel Upton

www.decisionlab.net

|||

According to this page AS2005 is still not supported:

http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html

MSSQL Server Analysis Services 2005

Not Supported

Not Supported

I supect that the support, when it arrives, will be limited for business logic, like named sets, because PP have it own calculation engine for that. Their strategy is to use other suppliers cubes as nothing more than data stores and keep the business logic inside its own products.

Regards

Thomas Ivarsson

|||

Interesting. So, let's suppose for a moment that Cognos 8's interface has great capabilities to build, on a raw AS2005 cube, with queries, calculated members, named sets, KPI's, by visual interface and/or MDX -- and create dashboards, reports, etc. Finally, let's also assume that no cube transactions or actions are necessary. In this context, what really bad limitations will be encountered by, say a legacy Cognos Team newly implementing AS2005, with doing that biz logic outside of BIDS and Analysis Svcs? Let's also suppose here that no cube translations or actions are necessary.

|||

No limitations except that all your business logic will reside in Cognos and you are unable to use tools from different suppliers. This strategy is almost the same as ProClarity have used except that ProClarity supports business logic in AS2005(MDX scipts) and provide its own tools for that.

And when organizations and business migrate to Office 2007, Excel 2007 will support SSAS2005 features.

Regards

Thomas Ivarsson

|||

I totally agree with you on that. Thanks very much, Thomas, for the extended dialogue. Very helpful!

Daniel Upton

AS2005 Cognos Power Play 8

Has anyone managed to use Cognos against Analysis Service 2005 cube? If so any help or point of reference welcome!

Thanks

Sutha

Hi Sutha,

No direct experience I'm afraid but I was talking to Allan Mitchell last night (and where were you, eh?) and he mentioned that he'd had Cognos people in to do a PoC on one of his AS2005 cubes and they were unable to get it to work properly either. Drop him a mail and he might be able to fill you in with the details.

Chris

|||

Since I'm also interested in finding out how well Cognos 8 leverages the AS 2005 feature set, I've Googled some relevent yet "only slightly better than nothing yet" findings this morning, and I'm posting summaries and links here...

Cognos Link to 7/11/07 article indicating Cognos 8 Controller 8.2 Software Environments
Updated: July 11, 2007 ... support of AS 2005 SP2, is listed by Cognos as "compatible", meaning partially tested by Cognos and/or tested or asserted by a Cognos Partner (vs. "Active" (fully tested and supported) or "not supported").

http://support.cognos.com/en/support/products/controller82_software_environments.html

Older Cognos Link to 7/11/2006 article indicating Cognos 8 MR2 does (at least at time of article) [or did] NOT SUPPORT SSAS 2005 cubes. http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html#olap

Request Feedback from Anyone Directly Experienced in Attempting to Connect Cognos 8 with AS2005 Cubes.

As an AS2005 worker (not Cognos), I'm keen to hear how well Cognos' 8's reporting and/or "downstream-from-OLAP" analytics environment can leverage the AS2005 feature set. It's scary not seeing an "Active" (fully tested, Cognos-approved) rating by Cognos in the above link.

Daniel Upton

www.decisionlab.net

|||

Hello! I have came across some implementatiions of Cognos on top of SQL Server 2000 and SQL 2005.

My conclusions are:

Cognos work best with its own cubes, read Transformer. The support for AS2000 cubes, last year, did not include named sets, six years after the release of AS2000, The support for SSAS2005 was nonexistent.

Cognos supplies products on top of other suppliers RDBMS products and is very frequently bought by customers that do not know that SQL Server 2005 includes SSAS2005 and SSRS2005. I have seen customers who have bought SQL Server 2005 and wasted money on Cognos 8 on top of that.

|||I don't know if you mean how to use Powerplay against an AS Cube, but this is from a link from cognos support on how to use AS2k5 as a datasource.

I don't have a Cognos Series8 install here to test this with, and it surely didn't work in Series 7 . Not that i was expecting it to..

Title:

How to use Microsoft Analysis Services 2005 Cubes in Cognos 8.2

Document#:

1031921.1

Updated:

Jun 21, 2007

Applies To:

Cognos 8 BI Analysis Studio 8.2 | Cognos 8 BI Cognos Connection 8.1 | Cognos 8 BI Framework Manager 8.2

Cases:

3

Collection:

KB


Description:

How to setup Microsoft Analysis Services 2005 Cubes in Cognos 8.2 as Data Source

Environment:

Win 2003 Standard Edition/ Enterprise Edition, SQL Server 2005 (SP2), Cognos 8.2

Steps:

Run the Cognos 8 service as a Domain Account (ie Cognos_service)
Add (Cognos_service) to SQLServer2005MSOLAPUser$<server_name>$<instance_name> Group on the machine running SQL Server 2005
Add (Cognos_service) to the role for under the database running the Analysis Service Cube
(Open MS Server Managerment Studio > Login to Analysis Services Server > Open the Database running the cube > Create a Role and assign read access to at least one cube inside the database and add (Cognos-service) to the role).
Go to Cognos Connection > Tools > Data Source > New Data Source > Name the Data source > Type ( Analysis Service 2005 ) > Host Name <Enter the host name of SQL Server 2005> > Named Instance <Enter the Instance Name of SQL Server>

{ If you don't have a defined instance leave this field blank. To check the instance name logon to MS Server Management Studio. Expected format

<Host Name>\ <Instance Name> ( MS Analysis Server 9.00.XXX ) - <Host Name>\< user name>.}
Choose the connection Type ( Cognos8 Credentials or External Namespace)
Test the connection.
Finish|||Oh, scratch that, i guess you were looking to use PP, guess i should have read the topic, and not the post Stick out tongue
|||

Chris,

Actually, if you were describing how to connect the Cognos reporting environment (with which I'm not familiar) to an AS2005 cube, then that is relevent. I don't currently plan to use a PP cube. Thx.

Of course, just connecting from Cognos does not mean that Cognos really leverages the AS2005 feature set, right? On that note, do you have any feedback on that question?

|||

OK. You're confirming my suspicions, which is helpful. Thanks, Thomas.

However, Cognos' support of AS2005 SP2 was quoted as "compatible" on the Cognos site (link is on my initial post on this thread.

Has anybody at MSDN has seen this alleged Cognos "compatible" support of AS2005 SP2 in action? If so, how did it do?

Daniel Upton

www.decisionlab.net

|||

According to this page AS2005 is still not supported:

http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html

MSSQL Server Analysis Services 2005

Not Supported

Not Supported

I supect that the support, when it arrives, will be limited for business logic, like named sets, because PP have it own calculation engine for that. Their strategy is to use other suppliers cubes as nothing more than data stores and keep the business logic inside its own products.

Regards

Thomas Ivarsson

|||

Interesting. So, let's suppose for a moment that Cognos 8's interface has great capabilities to build, on a raw AS2005 cube, with queries, calculated members, named sets, KPI's, by visual interface and/or MDX -- and create dashboards, reports, etc. Finally, let's also assume that no cube transactions or actions are necessary. In this context, what really bad limitations will be encountered by, say a legacy Cognos Team newly implementing AS2005, with doing that biz logic outside of BIDS and Analysis Svcs? Let's also suppose here that no cube translations or actions are necessary.

|||

No limitations except that all your business logic will reside in Cognos and you are unable to use tools from different suppliers. This strategy is almost the same as ProClarity have used except that ProClarity supports business logic in AS2005(MDX scipts) and provide its own tools for that.

And when organizations and business migrate to Office 2007, Excel 2007 will support SSAS2005 features.

Regards

Thomas Ivarsson

|||

I totally agree with you on that. Thanks very much, Thomas, for the extended dialogue. Very helpful!

Daniel Upton

|||Cognos 8.2 supports AS2005 SP2 and AS2000 as a datasource. I have implemented that at our site. Yes you don't need cognos once you have SQL Server. But sometime politics plays a role.

Best Regards
|||

Hello Jason,

Yes Cognos8 work on SSAS, but performance are very slowly, and nothing to help for this problem, Cognos say look at MS, and Ms don't say nothing.

Why an Excel is 10 time faster than Cognos 8 analysis studio when we are querying an SSAS CUBE?

Customer are nos so happy at end !!!

pascal

|||

Hello Chris.

I use Cognos 8 with SQL2000 cube, and with SQL2005 cube,

the main problems are :

1 - to publish SSAS cube we use Framework Manager and we can't add filters, properties, calculations.

2 - Performance are incredible, i say 10 time slower than Excel or Cube Browser, and we have nothing to help .

3 - Sometime i try to play with Reporting Services, but customer's say "i'ts not standard !"

Any idea to check performance at all levels ?

Merci de Suisse .

AS2005 Cognos Power Play 8

Has anyone managed to use Cognos against Analysis Service 2005 cube? If so any help or point of reference welcome!

Thanks

Sutha

Hi Sutha,

No direct experience I'm afraid but I was talking to Allan Mitchell last night (and where were you, eh?) and he mentioned that he'd had Cognos people in to do a PoC on one of his AS2005 cubes and they were unable to get it to work properly either. Drop him a mail and he might be able to fill you in with the details.

Chris

|||

Since I'm also interested in finding out how well Cognos 8 leverages the AS 2005 feature set, I've Googled some relevent yet "only slightly better than nothing yet" findings this morning, and I'm posting summaries and links here...

Cognos Link to 7/11/07 article indicating Cognos 8 Controller 8.2 Software Environments
Updated: July 11, 2007 ... support of AS 2005 SP2, is listed by Cognos as "compatible", meaning partially tested by Cognos and/or tested or asserted by a Cognos Partner (vs. "Active" (fully tested and supported) or "not supported").

http://support.cognos.com/en/support/products/controller82_software_environments.html

Older Cognos Link to 7/11/2006 article indicating Cognos 8 MR2 does (at least at time of article) [or did] NOT SUPPORT SSAS 2005 cubes. http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html#olap

Request Feedback from Anyone Directly Experienced in Attempting to Connect Cognos 8 with AS2005 Cubes.

As an AS2005 worker (not Cognos), I'm keen to hear how well Cognos' 8's reporting and/or "downstream-from-OLAP" analytics environment can leverage the AS2005 feature set. It's scary not seeing an "Active" (fully tested, Cognos-approved) rating by Cognos in the above link.

Daniel Upton

www.decisionlab.net

|||

Hello! I have came across some implementatiions of Cognos on top of SQL Server 2000 and SQL 2005.

My conclusions are:

Cognos work best with its own cubes, read Transformer. The support for AS2000 cubes, last year, did not include named sets, six years after the release of AS2000, The support for SSAS2005 was nonexistent.

Cognos supplies products on top of other suppliers RDBMS products and is very frequently bought by customers that do not know that SQL Server 2005 includes SSAS2005 and SSRS2005. I have seen customers who have bought SQL Server 2005 and wasted money on Cognos 8 on top of that.

|||I don't know if you mean how to use Powerplay against an AS Cube, but this is from a link from cognos support on how to use AS2k5 as a datasource.

I don't have a Cognos Series8 install here to test this with, and it surely didn't work in Series 7 . Not that i was expecting it to..

Title:

How to use Microsoft Analysis Services 2005 Cubes in Cognos 8.2

Document#:

1031921.1

Updated:

Jun 21, 2007

Applies To:

Cognos 8 BI Analysis Studio 8.2 | Cognos 8 BI Cognos Connection 8.1 | Cognos 8 BI Framework Manager 8.2

Cases:

3

Collection:

KB


Description:

How to setup Microsoft Analysis Services 2005 Cubes in Cognos 8.2 as Data Source

Environment:

Win 2003 Standard Edition/ Enterprise Edition, SQL Server 2005 (SP2), Cognos 8.2

Steps:

Run the Cognos 8 service as a Domain Account (ie Cognos_service)
Add (Cognos_service) to SQLServer2005MSOLAPUser$<server_name>$<instance_name> Group on the machine running SQL Server 2005
Add (Cognos_service) to the role for under the database running the Analysis Service Cube
(Open MS Server Managerment Studio > Login to Analysis Services Server > Open the Database running the cube > Create a Role and assign read access to at least one cube inside the database and add (Cognos-service) to the role).
Go to Cognos Connection > Tools > Data Source > New Data Source > Name the Data source > Type ( Analysis Service 2005 ) > Host Name <Enter the host name of SQL Server 2005> > Named Instance <Enter the Instance Name of SQL Server>

{ If you don't have a defined instance leave this field blank. To check the instance name logon to MS Server Management Studio. Expected format

<Host Name>\ <Instance Name> ( MS Analysis Server 9.00.XXX ) - <Host Name>\< user name>.}
Choose the connection Type ( Cognos8 Credentials or External Namespace)
Test the connection.
Finish|||Oh, scratch that, i guess you were looking to use PP, guess i should have read the topic, and not the post Stick out tongue
|||

Chris,

Actually, if you were describing how to connect the Cognos reporting environment (with which I'm not familiar) to an AS2005 cube, then that is relevent. I don't currently plan to use a PP cube. Thx.

Of course, just connecting from Cognos does not mean that Cognos really leverages the AS2005 feature set, right? On that note, do you have any feedback on that question?

|||

OK. You're confirming my suspicions, which is helpful. Thanks, Thomas.

However, Cognos' support of AS2005 SP2 was quoted as "compatible" on the Cognos site (link is on my initial post on this thread.

Has anybody at MSDN has seen this alleged Cognos "compatible" support of AS2005 SP2 in action? If so, how did it do?

Daniel Upton

www.decisionlab.net

|||

According to this page AS2005 is still not supported:

http://support.cognos.com/en/support/products/cognos8mr2_software_environments.html

MSSQL Server Analysis Services 2005

Not Supported

Not Supported

I supect that the support, when it arrives, will be limited for business logic, like named sets, because PP have it own calculation engine for that. Their strategy is to use other suppliers cubes as nothing more than data stores and keep the business logic inside its own products.

Regards

Thomas Ivarsson

|||

Interesting. So, let's suppose for a moment that Cognos 8's interface has great capabilities to build, on a raw AS2005 cube, with queries, calculated members, named sets, KPI's, by visual interface and/or MDX -- and create dashboards, reports, etc. Finally, let's also assume that no cube transactions or actions are necessary. In this context, what really bad limitations will be encountered by, say a legacy Cognos Team newly implementing AS2005, with doing that biz logic outside of BIDS and Analysis Svcs? Let's also suppose here that no cube translations or actions are necessary.

|||

No limitations except that all your business logic will reside in Cognos and you are unable to use tools from different suppliers. This strategy is almost the same as ProClarity have used except that ProClarity supports business logic in AS2005(MDX scipts) and provide its own tools for that.

And when organizations and business migrate to Office 2007, Excel 2007 will support SSAS2005 features.

Regards

Thomas Ivarsson

|||

I totally agree with you on that. Thanks very much, Thomas, for the extended dialogue. Very helpful!

Daniel Upton

|||Cognos 8.2 supports AS2005 SP2 and AS2000 as a datasource. I have implemented that at our site. Yes you don't need cognos once you have SQL Server. But sometime politics plays a role.

Best Regards
|||

Hello Jason,

Yes Cognos8 work on SSAS, but performance are very slowly, and nothing to help for this problem, Cognos say look at MS, and Ms don't say nothing.

Why an Excel is 10 time faster than Cognos 8 analysis studio when we are querying an SSAS CUBE?

Customer are nos so happy at end !!!

pascal

|||

Hello Chris.

I use Cognos 8 with SQL2000 cube, and with SQL2005 cube,

the main problems are :

1 - to publish SSAS cube we use Framework Manager and we can't add filters, properties, calculations.

2 - Performance are incredible, i say 10 time slower than Excel or Cube Browser, and we have nothing to help .

3 - Sometime i try to play with Reporting Services, but customer's say "i'ts not standard !"

Any idea to check performance at all levels ?

Merci de Suisse .

As2000 and Analysis Services provider

I can design the dataset using the graphical tools but the report refuses to
run, is there a work around. Presumably the problem will be fixed in the
next service pack?Hello Phil,
If you change the design mode to text, could you get the proper MDX? If you
run the MDX, could you see the correct results?
It seems you custom the data processing extension. Is this true and how you
perform this customization?
Best Regards,
Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Partner Support
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
>From: "Phil Nicholas" <PhilNicholas@.nospam.nospam>
>Subject: As2000 and Analysis Services provider
>Date: Tue, 7 Mar 2006 10:21:40 -0000
>Lines: 5
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2670
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670
>X-RFC2646: Format=Flowed; Original
>Message-ID: <#8D4eCdQGHA.5592@.TK2MSFTNGP11.phx.gbl>
>Newsgroups: microsoft.public.sqlserver.reportingsvcs
>NNTP-Posting-Host: cpc2-norw3-4-0-cust28.pete.cable.ntl.com 82.25.55.28
>Path: TK2MSFTNGXA03.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
>Xref: TK2MSFTNGXA03.phx.gbl microsoft.public.sqlserver.reportingsvcs:69941
>X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
>I can design the dataset using the graphical tools but the report refuses
to
>run, is there a work around. Presumably the problem will be fixed in the
>next service pack?
>
>

Wednesday, March 7, 2012

AS/400 DB2 and Analysis services

I am trying to build a cube.

The data is on the AS/400

I can make a successful connection and can see the table.

When I pull the tables in a Data Source View and try to make my own relationships,

there is no columns. In fact when I try to Explore data, it return an error:

Object reference not set to an instance of an object.

Can someone tell me how to resolve this?

Hi,

Can you please tell me if this happens with Analysis Services SP1 and using Microsoft's OleDB provider for DB2 (that is the only provider supported)? Also, in case you tried, does it work against UDB?

--
Raymond

This posting is provided "AS IS" with no warranties, and confers no rights.|||

Hi,

Try to use the IBM Client Access ODBC Driver.

Regards, Christian

|||

Looks like I don have the proper version. I download the Microsoft OLEDB Provider for DB2.

Went to install it and got this:

Setup cannot continue because a supported version of SQL Server 2005 is not installed. Supported versions include Enterprise, Developer, or Enterprise Evaluation.

Thanks.

BTW I did try the IBM DB2 UDB version 5.x and that is what I was trying to use. Apparently, IBM has reported a bug. They working on it and it won't be available until the next fix. Whenever that will be.....

AS Processing Task

When using the AS processing task with a connection to "an Analysis Services project in this solution", only some processing options are available for processing dimensions. For instance, it is not possible to select "Process Update". Once I change the connection manager to point to the deployed cube database, I can choose from all the options. Is this by design?I have searched the documentation and the net for information on this. I have not been able to find an explanation. Anyone? At all? Smile

AS hangs when running a complex mdx query

Hi all,

I am having a problem with Analysis Services. Currently we are developing an analysis application that enables a user to view up to 5 year survival for patients.

I have written the following MDX to perform the calculated measure:

Code Snippet

/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;


//**************************************************************************************
//**************************************************************************************
//**************************************************************************************
// SURVIVAL


// Censor flag = 1 if censored, 0 if noncensored (or true failure),
// NULL if there is data error (death date <= diagnosis date)


CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]
AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],
FORMAT_STRING = "#",
VISIBLE = 0 ;


CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]
AS 0,
VISIBLE = 1;
SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =
(
Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,
when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)
in the dataset, which is the total number of patients with censor flag values of
either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died
by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than
date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*
This is the survival censor count at the top ("root") level of survival time,
*/


Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(
// Number at risk from previous month,
// minus total number of deaths (both censored and uncensored)
// during current month

( [Survival Time].CurrentMember.PrevMember, [Number at risk] )
- [N Total Deaths]

)

End
);
END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]
AS 100,
FORMAT_STRING = '0.0',
VISIBLE = 1;
SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =
(
Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):
When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then (
(
(
( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])
)
)*100
)

Else // At subsequent survival times ( t > 0, censor <> null ):
(
Case

// If everyone's dead (at right end of time(x) axis)
When [Number at risk] = 0

// Then use survival from previous month (PrevMember)
Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (
(
// Number at risk from previous month, minus true failures (noncensored deaths),
// divided by Number at risk from previous month ...
(
( ([Survival Time].CurrentMember.PrevMember, [Number at risk] ) - ( [Survival Time].CurrentMember,[N Noncensored Deaths]) ) /
([Survival Time].CurrentMember.PrevMember, [Number at risk]
)
)
// then multiplied by survival from previous month
* ([Survival Time].CurrentMember.PrevMember, [Survival])
)
)
End
)
End
); END SCOPE;

When I put the Calculated Measure then the survival time dimension in the x axis in the pivot table, it works fine. But when I put a dimension in the filter and choose multiple items (not all and not only one) it tries to build and run the query but seems to hang.

Has anyone else experienced this sort of thing before?

Would it be something to do with the MDX?

I have been struggling with this for a while and not been able to work it out. ANY suggestions would be fantastic.

If you need further information, let me know.

Steve

I have not gone through your code in too much detail, but you main issue is going to be the .CurrentMember function.

When you have mulitple members on the WHERE clause (which is what happens when you filter by more than one member), you do not have a single current member, you actually have a set of current members. SSAS 2005 just does not handle this well. See this blog post for more details: http://sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx it might give you some hints on how to alter your code.

|||

Darren,

Thanks for your reply. I tried going to that blog post but couldn't open the page. Are you able to provide another location for the blog?

Cheers,

Stephen

|||

Yeah, I found out that the whole of sqljunkies.com appears to have gone off the air, no word on when or if it will return.

You can find an archived copy of this post in the web archive at http://web.archive.org/web/20070515145719/http://www.sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx

|||

Thanks Darren. I found the blog but am not sure how to fix my code.

I actually tried a couple of things with no success. I removed the .CurrentMember from my code (see code snippet) and it worked for single select queries but it still hangs for multiselect.

Code Snippet

/*

The CALCULATE command controls the aggregation of leaf cells in the cube.

If the CALCULATE command is deleted or modified, the data within the cube is affected.

You should edit this command only if you manually specify how the cube is aggregated.

*/

CALCULATE;

//**************************************************************************************

//**************************************************************************************

//**************************************************************************************

// SURVIVAL

// Censor flag = 1 if censored, 0 if noncensored (or true failure),

// NULL if there is data error (death date <= diagnosis date)

CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]

AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],

FORMAT_STRING = "#",

VISIBLE = 0 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]

AS 0,

VISIBLE = 1;

SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =

(

Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,

when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)

in the dataset, which is the total number of patients with censor flag values of

either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died

by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than

date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty([Survival Time].PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*

This is the survival censor count at the top ("root") level of survival time,

*/

Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(

// Number at risk from previous month,

// minus total number of deaths (both censored and uncensored)

// during current month

([Survival Time].PrevMember, [Number at risk] )

- [N Total Deaths]

)

End

);

END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]

AS 100,

FORMAT_STRING = '0.0',

VISIBLE = 1;

SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =

(

Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):

When IsEmpty([Survival Time].PrevMember )

Then (

(

(

( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])

)

)*100

)

Else // At subsequent survival times ( t > 0, censor <> null ):

(

Case

// If everyone's dead (at right end of time(x) axis)

When [Number at risk] = 0

// Then use survival from previous month (PrevMember)

Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (

(

// Number at risk from previous month, minus true failures (noncensored deaths),

// divided by Number at risk from previous month ...

(

( ([Survival Time].PrevMember, [Number at risk] ) - ([Survival Time],[N Noncensored Deaths]) ) /

([Survival Time].PrevMember, [Number at risk]

)

)

// then multiplied by survival from previous month

* ([Survival Time].PrevMember, [Survival])

)

)

End

)

End

); END SCOPE;

I appreciate you helping me on this.

Cheers,

Steve

|||

Sorry, I was not entirely clear. While removing the explicit CurrentMember calls is good, there is still an implied one for the .PrevMember calls. The query engine still needs a single member context to calculate a PrevMember. There is a way to do this, but it has the unforutnate side effect of slowing down your calc for single member select. What you would need to do is to wrap your case statement (the bit after the equals inside your scope statement) as follows:

GENERATE( EXISTING [Survival Time].Members, <case statement> )

The Existing operator returns the set of one or more survival time members that are in context for the current query and the generate function essentially loops over the set and evaluates the case statement for each one. The results are then aggregated together and returned.

|||

Hi Darren,

My guess is that multi-select is not occurring on the [Survival Time] dimension, otherwise there should have been an error like: "The MDX function CURRENTMEMBER failed because the coordinate for .. attribute contains a set", as mentioned in Mosha's blog. The scenario described by Steve suggests that [Survival Time] is on columns, and some other dimension(s) (which aren't mentioned in the script) are being multi-selected in the filter field - but Steve could confirm this? It might be useful to know the client tool (presumably some flavor of Excel).

|||

Hi Deepak,

You are right. We are selecting dimensions such as age, location etc.

We are using Dundas for our client tool.

Cheers,

Steve

|||

Steve,

Thanks for the clarification - to confirm the exact Dundas product, is it Dundas Chart for .NET - OLAP Services?

|||

Deepak,

It is Dundas Chart for .NET - OLAP Service (5.5).

Thanks,

Steve

|||

Here are some initial ideas for improving script performance - with more information, these could be elaborated:

It might be possible to handle the first [Survival Time] member using static scoping, rather than a run-time case statement, as discussed in this article. What is the structure of [Survival Time] - how many levels does it have?

Not sure which measures are cube vs. calculated, but if [Measures].[N Total Deaths] and [Measures].[N Censored Deaths] are cube measures, [MEASURES].[N Noncensored Deaths] could be implemented as a cube measure as well. Could you describe the fact table/measure group and associated measures?

Using running sum calculations which leverage block computation - it looks like [MEASURES].[Number at risk] could be implemented using a running sum of [N Total Deaths]?

|||

Hi Deepak,

I have run the query when it works and when it hangs. And the following MDX queries are what resulted:

Working:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( ( [Year of diagnosis].[Year of diagnosis].[All] ), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Not Working (hangs/uses up all resources):

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( VISUALTOTALS({ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Thanks for your help so fay.

Steve

|||

Hi Steve,

Just wanted to clarify a couple of things:

- Is [Survival Time] just a single level (month) dimension - and approx. how many members?

- The VisualTotals() seem to be superfluous, so could you check whether the 2nd query still hangs without VisualTotals(), like:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, { [Measures].[Survival] } ) } ON ROWS FROM [Survival] WHERE ( { [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }, ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

|||

Hi Deepak,

The [Survival Time] dimension is a single level dimension. It is a count of months from a starting date to a death date.

I also ran the query from the browser in SQL Server Management Studio which dropped Visual Totals and it still hung.

Thanks again for your help.

Cheers,

Steve

|||

I'm not sure you need any of the VisualTotals functions. And unless you have overriden the default member settings on some of your dimensions, explicit referencing the default members would be redundant. The following two queries should be equivalent to the last 2 that you posted.

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE

( [Measures].[Survival],[Year of diagnosis].[Year of diagnosis].[All] );

--Was not Working

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE ( [Measures].[Survival],

{ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001]

, [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] })

AS hangs when running a complex mdx querie

Hi all,

I am having a problem with Analysis Services. Currently we are developing an analysis application that enables a user to view up to 5 year survival for patients.

I have written the following MDX to perform the calculated measure:

Code Snippet

/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;


//**************************************************************************************
//**************************************************************************************
//**************************************************************************************
// SURVIVAL


// Censor flag = 1 if censored, 0 if noncensored (or true failure),
// NULL if there is data error (death date <= diagnosis date)


CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]
AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],
FORMAT_STRING = "#",
VISIBLE = 0 ;


CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]
AS 0,
VISIBLE = 1;
SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =
(
Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,
when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)
in the dataset, which is the total number of patients with censor flag values of
either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died
by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than
date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*
This is the survival censor count at the top ("root") level of survival time,
*/


Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(
// Number at risk from previous month,
// minus total number of deaths (both censored and uncensored)
// during current month

( [Survival Time].CurrentMember.PrevMember, [Number at risk] )
- [N Total Deaths]

)

End
);
END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]
AS 100,
FORMAT_STRING = '0.0',
VISIBLE = 1;
SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =
(
Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):
When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then (
(
(
( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])
)
)*100
)

Else // At subsequent survival times ( t > 0, censor <> null ):
(
Case

// If everyone's dead (at right end of time(x) axis)
When [Number at risk] = 0

// Then use survival from previous month (PrevMember)
Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (
(
// Number at risk from previous month, minus true failures (noncensored deaths),
// divided by Number at risk from previous month ...
(
( ([Survival Time].CurrentMember.PrevMember, [Number at risk] ) - ( [Survival Time].CurrentMember,[N Noncensored Deaths]) ) /
([Survival Time].CurrentMember.PrevMember, [Number at risk]
)
)
// then multiplied by survival from previous month
* ([Survival Time].CurrentMember.PrevMember, [Survival])
)
)
End
)
End
); END SCOPE;

When I put the Calculated Measure then the survival time dimension in the x axis in the pivot table, it works fine. But when I put a dimension in the filter and choose multiple items (not all and not only one) it tries to build and run the query but seems to hang.

Has anyone else experienced this sort of thing before?

Would it be something to do with the MDX?

I have been struggling with this for a while and not been able to work it out. ANY suggestions would be fantastic.

If you need further information, let me know.

Steve

I have not gone through your code in too much detail, but you main issue is going to be the .CurrentMember function.

When you have mulitple members on the WHERE clause (which is what happens when you filter by more than one member), you do not have a single current member, you actually have a set of current members. SSAS 2005 just does not handle this well. See this blog post for more details: http://sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx it might give you some hints on how to alter your code.

|||

Darren,

Thanks for your reply. I tried going to that blog post but couldn't open the page. Are you able to provide another location for the blog?

Cheers,

Stephen

|||

Yeah, I found out that the whole of sqljunkies.com appears to have gone off the air, no word on when or if it will return.

You can find an archived copy of this post in the web archive at http://web.archive.org/web/20070515145719/http://www.sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx

|||

Thanks Darren. I found the blog but am not sure how to fix my code.

I actually tried a couple of things with no success. I removed the .CurrentMember from my code (see code snippet) and it worked for single select queries but it still hangs for multiselect.

Code Snippet

/*

The CALCULATE command controls the aggregation of leaf cells in the cube.

If the CALCULATE command is deleted or modified, the data within the cube is affected.

You should edit this command only if you manually specify how the cube is aggregated.

*/

CALCULATE;

//**************************************************************************************

//**************************************************************************************

//**************************************************************************************

// SURVIVAL

// Censor flag = 1 if censored, 0 if noncensored (or true failure),

// NULL if there is data error (death date <= diagnosis date)

CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]

AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],

FORMAT_STRING = "#",

VISIBLE = 0 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]

AS 0,

VISIBLE = 1;

SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =

(

Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,

when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)

in the dataset, which is the total number of patients with censor flag values of

either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died

by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than

date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty([Survival Time].PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*

This is the survival censor count at the top ("root") level of survival time,

*/

Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(

// Number at risk from previous month,

// minus total number of deaths (both censored and uncensored)

// during current month

([Survival Time].PrevMember, [Number at risk] )

- [N Total Deaths]

)

End

);

END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]

AS 100,

FORMAT_STRING = '0.0',

VISIBLE = 1;

SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =

(

Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):

When IsEmpty([Survival Time].PrevMember )

Then (

(

(

( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])

)

)*100

)

Else // At subsequent survival times ( t > 0, censor <> null ):

(

Case

// If everyone's dead (at right end of time(x) axis)

When [Number at risk] = 0

// Then use survival from previous month (PrevMember)

Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (

(

// Number at risk from previous month, minus true failures (noncensored deaths),

// divided by Number at risk from previous month ...

(

( ([Survival Time].PrevMember, [Number at risk] ) - ([Survival Time],[N Noncensored Deaths]) ) /

([Survival Time].PrevMember, [Number at risk]

)

)

// then multiplied by survival from previous month

* ([Survival Time].PrevMember, [Survival])

)

)

End

)

End

); END SCOPE;

I appreciate you helping me on this.

Cheers,

Steve

|||

Sorry, I was not entirely clear. While removing the explicit CurrentMember calls is good, there is still an implied one for the .PrevMember calls. The query engine still needs a single member context to calculate a PrevMember. There is a way to do this, but it has the unforutnate side effect of slowing down your calc for single member select. What you would need to do is to wrap your case statement (the bit after the equals inside your scope statement) as follows:

GENERATE( EXISTING [Survival Time].Members, <case statement> )

The Existing operator returns the set of one or more survival time members that are in context for the current query and the generate function essentially loops over the set and evaluates the case statement for each one. The results are then aggregated together and returned.

|||

Hi Darren,

My guess is that multi-select is not occurring on the [Survival Time] dimension, otherwise there should have been an error like: "The MDX function CURRENTMEMBER failed because the coordinate for .. attribute contains a set", as mentioned in Mosha's blog. The scenario described by Steve suggests that [Survival Time] is on columns, and some other dimension(s) (which aren't mentioned in the script) are being multi-selected in the filter field - but Steve could confirm this? It might be useful to know the client tool (presumably some flavor of Excel).

|||

Hi Deepak,

You are right. We are selecting dimensions such as age, location etc.

We are using Dundas for our client tool.

Cheers,

Steve

|||

Steve,

Thanks for the clarification - to confirm the exact Dundas product, is it Dundas Chart for .NET - OLAP Services?

|||

Deepak,

It is Dundas Chart for .NET - OLAP Service (5.5).

Thanks,

Steve

|||

Here are some initial ideas for improving script performance - with more information, these could be elaborated:

It might be possible to handle the first [Survival Time] member using static scoping, rather than a run-time case statement, as discussed in this article. What is the structure of [Survival Time] - how many levels does it have?

Not sure which measures are cube vs. calculated, but if [Measures].[N Total Deaths] and [Measures].[N Censored Deaths] are cube measures, [MEASURES].[N Noncensored Deaths] could be implemented as a cube measure as well. Could you describe the fact table/measure group and associated measures?

Using running sum calculations which leverage block computation - it looks like [MEASURES].[Number at risk] could be implemented using a running sum of [N Total Deaths]?

|||

Hi Deepak,

I have run the query when it works and when it hangs. And the following MDX queries are what resulted:

Working:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( ( [Year of diagnosis].[Year of diagnosis].[All] ), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Not Working (hangs/uses up all resources):

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( VISUALTOTALS({ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Thanks for your help so fay.

Steve

|||

Hi Steve,

Just wanted to clarify a couple of things:

- Is [Survival Time] just a single level (month) dimension - and approx. how many members?

- The VisualTotals() seem to be superfluous, so could you check whether the 2nd query still hangs without VisualTotals(), like:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, { [Measures].[Survival] } ) } ON ROWS FROM [Survival] WHERE ( { [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }, ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

|||

Hi Deepak,

The [Survival Time] dimension is a single level dimension. It is a count of months from a starting date to a death date.

I also ran the query from the browser in SQL Server Management Studio which dropped Visual Totals and it still hung.

Thanks again for your help.

Cheers,

Steve

|||

I'm not sure you need any of the VisualTotals functions. And unless you have overriden the default member settings on some of your dimensions, explicit referencing the default members would be redundant. The following two queries should be equivalent to the last 2 that you posted.

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE

( [Measures].[Survival],[Year of diagnosis].[Year of diagnosis].[All] );

--Was not Working

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE ( [Measures].[Survival],

{ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001]

, [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] })

AS hangs when running a complex mdx querie

Hi all,

I am having a problem with Analysis Services. Currently we are developing an analysis application that enables a user to view up to 5 year survival for patients.

I have written the following MDX to perform the calculated measure:

Code Snippet

/*
The CALCULATE command controls the aggregation of leaf cells in the cube.
If the CALCULATE command is deleted or modified, the data within the cube is affected.
You should edit this command only if you manually specify how the cube is aggregated.
*/
CALCULATE;


//**************************************************************************************
//**************************************************************************************
//**************************************************************************************
// SURVIVAL


// Censor flag = 1 if censored, 0 if noncensored (or true failure),
// NULL if there is data error (death date <= diagnosis date)


CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]
AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],
FORMAT_STRING = "#",
VISIBLE = 0 ;


CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]
AS 0,
VISIBLE = 1;
SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =
(
Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,
when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)
in the dataset, which is the total number of patients with censor flag values of
either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died
by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than
date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*
This is the survival censor count at the top ("root") level of survival time,
*/


Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(
// Number at risk from previous month,
// minus total number of deaths (both censored and uncensored)
// during current month

( [Survival Time].CurrentMember.PrevMember, [Number at risk] )
- [N Total Deaths]

)

End
);
END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]
AS 100,
FORMAT_STRING = '0.0',
VISIBLE = 1;
SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =
(
Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):
When IsEmpty( [Survival Time].CurrentMember.PrevMember )

Then (
(
(
( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])
)
)*100
)

Else // At subsequent survival times ( t > 0, censor <> null ):
(
Case

// If everyone's dead (at right end of time(x) axis)
When [Number at risk] = 0

// Then use survival from previous month (PrevMember)
Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (
(
// Number at risk from previous month, minus true failures (noncensored deaths),
// divided by Number at risk from previous month ...
(
( ([Survival Time].CurrentMember.PrevMember, [Number at risk] ) - ( [Survival Time].CurrentMember,[N Noncensored Deaths]) ) /
([Survival Time].CurrentMember.PrevMember, [Number at risk]
)
)
// then multiplied by survival from previous month
* ([Survival Time].CurrentMember.PrevMember, [Survival])
)
)
End
)
End
); END SCOPE;

When I put the Calculated Measure then the survival time dimension in the x axis in the pivot table, it works fine. But when I put a dimension in the filter and choose multiple items (not all and not only one) it tries to build and run the query but seems to hang.

Has anyone else experienced this sort of thing before?

Would it be something to do with the MDX?

I have been struggling with this for a while and not been able to work it out. ANY suggestions would be fantastic.

If you need further information, let me know.

Steve

I have not gone through your code in too much detail, but you main issue is going to be the .CurrentMember function.

When you have mulitple members on the WHERE clause (which is what happens when you filter by more than one member), you do not have a single current member, you actually have a set of current members. SSAS 2005 just does not handle this well. See this blog post for more details: http://sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx it might give you some hints on how to alter your code.

|||

Darren,

Thanks for your reply. I tried going to that blog post but couldn't open the page. Are you able to provide another location for the blog?

Cheers,

Stephen

|||

Yeah, I found out that the whole of sqljunkies.com appears to have gone off the air, no word on when or if it will return.

You can find an archived copy of this post in the web archive at http://web.archive.org/web/20070515145719/http://www.sqljunkies.com/WebLog/mosha/archive/2005/11/18/multiselect_friendly_mdx.aspx

|||

Thanks Darren. I found the blog but am not sure how to fix my code.

I actually tried a couple of things with no success. I removed the .CurrentMember from my code (see code snippet) and it worked for single select queries but it still hangs for multiselect.

Code Snippet

/*

The CALCULATE command controls the aggregation of leaf cells in the cube.

If the CALCULATE command is deleted or modified, the data within the cube is affected.

You should edit this command only if you manually specify how the cube is aggregated.

*/

CALCULATE;

//**************************************************************************************

//**************************************************************************************

//**************************************************************************************

// SURVIVAL

// Censor flag = 1 if censored, 0 if noncensored (or true failure),

// NULL if there is data error (death date <= diagnosis date)

CREATE MEMBER CURRENTCUBE.[MEASURES].[N Noncensored Deaths]

AS [Measures].[N Total Deaths] - [Measures].[N Censored Deaths],

FORMAT_STRING = "#",

VISIBLE = 0 ;

CREATE MEMBER CURRENTCUBE.[MEASURES].[Number at risk]

AS 0,

VISIBLE = 1;

SCOPE ([Measures].[Number at risk]); ([Survival Time].Members(1): Null) =

(

Case

/*

At the first survival time (defined as Null, i.e. 1st row with "Blank" time,

when there is no previous month; PrevMember is empty):

Number at risk is simply total number of valid death dates (both censored and uncensored)

in the dataset, which is the total number of patients with censor flag values of

either 0 or 1 (not null), i.e. Number at risk at t == 0 (date of diagnosis).

NOTE: Death dates are right-censored at 01 June 2006 - people who haven't died

by this date are censored and assigned a death date of June 1, 2006.

The censor flag is set to null only when death date is same as or EARLIER than

date of diagnosis, i.e. excludes patients diagnosed during autopsy.

*/

When IsEmpty([Survival Time].PrevMember )

Then ( Root( [Survival Time] ), [N Total Deaths] )

/*

This is the survival censor count at the top ("root") level of survival time,

*/

Else // At subsequent survival times ( t > 0, censor <> null ), Number at risk is:

(

// Number at risk from previous month,

// minus total number of deaths (both censored and uncensored)

// during current month

([Survival Time].PrevMember, [Number at risk] )

- [N Total Deaths]

)

End

);

END SCOPE;

//--

CREATE MEMBER CURRENTCUBE.[MEASURES].[Survival]

AS 100,

FORMAT_STRING = '0.0',

VISIBLE = 1;

SCOPE ([Measures].[Survival]); ([Survival Time].Members(1): Null) =

(

Case

// At the first survival time (defined as Null, i.e. 1st row with "Blank" time):

When IsEmpty([Survival Time].PrevMember )

Then (

(

(

( Root([Survival Time]),[N Total Deaths] ) - [N Total Deaths] ) / ( (Root([Survival Time]), [N Total Deaths] ) - ([Survival Time],[N Censored Deaths])

)

)*100

)

Else // At subsequent survival times ( t > 0, censor <> null ):

(

Case

// If everyone's dead (at right end of time(x) axis)

When [Number at risk] = 0

// Then use survival from previous month (PrevMember)

Then "Censored" //( [Survival Time].CurrentMember.PrevMember, [Survival] )

Else (

(

// Number at risk from previous month, minus true failures (noncensored deaths),

// divided by Number at risk from previous month ...

(

( ([Survival Time].PrevMember, [Number at risk] ) - ([Survival Time],[N Noncensored Deaths]) ) /

([Survival Time].PrevMember, [Number at risk]

)

)

// then multiplied by survival from previous month

* ([Survival Time].PrevMember, [Survival])

)

)

End

)

End

); END SCOPE;

I appreciate you helping me on this.

Cheers,

Steve

|||

Sorry, I was not entirely clear. While removing the explicit CurrentMember calls is good, there is still an implied one for the .PrevMember calls. The query engine still needs a single member context to calculate a PrevMember. There is a way to do this, but it has the unforutnate side effect of slowing down your calc for single member select. What you would need to do is to wrap your case statement (the bit after the equals inside your scope statement) as follows:

GENERATE( EXISTING [Survival Time].Members, <case statement> )

The Existing operator returns the set of one or more survival time members that are in context for the current query and the generate function essentially loops over the set and evaluates the case statement for each one. The results are then aggregated together and returned.

|||

Hi Darren,

My guess is that multi-select is not occurring on the [Survival Time] dimension, otherwise there should have been an error like: "The MDX function CURRENTMEMBER failed because the coordinate for .. attribute contains a set", as mentioned in Mosha's blog. The scenario described by Steve suggests that [Survival Time] is on columns, and some other dimension(s) (which aren't mentioned in the script) are being multi-selected in the filter field - but Steve could confirm this? It might be useful to know the client tool (presumably some flavor of Excel).

|||

Hi Deepak,

You are right. We are selecting dimensions such as age, location etc.

We are using Dundas for our client tool.

Cheers,

Steve

|||

Steve,

Thanks for the clarification - to confirm the exact Dundas product, is it Dundas Chart for .NET - OLAP Services?

|||

Deepak,

It is Dundas Chart for .NET - OLAP Service (5.5).

Thanks,

Steve

|||

Here are some initial ideas for improving script performance - with more information, these could be elaborated:

It might be possible to handle the first [Survival Time] member using static scoping, rather than a run-time case statement, as discussed in this article. What is the structure of [Survival Time] - how many levels does it have?

Not sure which measures are cube vs. calculated, but if [Measures].[N Total Deaths] and [Measures].[N Censored Deaths] are cube measures, [MEASURES].[N Noncensored Deaths] could be implemented as a cube measure as well. Could you describe the fact table/measure group and associated measures?

Using running sum calculations which leverage block computation - it looks like [MEASURES].[Number at risk] could be implemented using a running sum of [N Total Deaths]?

|||

Hi Deepak,

I have run the query when it works and when it hangs. And the following MDX queries are what resulted:

Working:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( ( [Year of diagnosis].[Year of diagnosis].[All] ), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Not Working (hangs/uses up all resources):

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, VISUALTOTALS({ [Measures].[Survival] }) ) } ON ROWS FROM [Survival] WHERE ( VISUALTOTALS({ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }), ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

Thanks for your help so fay.

Steve

|||

Hi Steve,

Just wanted to clarify a couple of things:

- Is [Survival Time] just a single level (month) dimension - and approx. how many members?

- The VisualTotals() seem to be superfluous, so could you check whether the 2nd query still hangs without VisualTotals(), like:

SELECT NON EMPTY {{[Survival Time].[Survival Time].[All]}, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS, NON EMPTY { Crossjoin({{[Cancer].[Cancers].[All]}, [Cancer].[Cancers].[Stream].members}, { [Measures].[Survival] } ) } ON ROWS FROM [Survival] WHERE ( { [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001], [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] }, ( [Age at diagnosis].[Age].[All] ), ( [Sex].[Sex].[All] ), ( [Residence].[Residence].[All] ), ( [Rurality].[Rurality].[All] ) )

|||

Hi Deepak,

The [Survival Time] dimension is a single level dimension. It is a count of months from a starting date to a death date.

I also ran the query from the browser in SQL Server Management Studio which dropped Visual Totals and it still hung.

Thanks again for your help.

Cheers,

Steve

|||

I'm not sure you need any of the VisualTotals functions. And unless you have overriden the default member settings on some of your dimensions, explicit referencing the default members would be redundant. The following two queries should be equivalent to the last 2 that you posted.

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE

( [Measures].[Survival],[Year of diagnosis].[Year of diagnosis].[All] );

--Was not Working

SELECT

NON EMPTY

{

{[Survival Time].[Survival Time].[All]}

, [Survival Time].[Survival Time].[Survival Time].members} ON COLUMNS

, NON EMPTY

{[Cancer].[Cancers].[All]

, [Cancer].[Cancers].[Stream].members}

ON ROWS

FROM [Survival]

WHERE ( [Measures].[Survival],

{ [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2001]

, [Year of diagnosis].[Year of diagnosis].[Year of diagnosis].&[2003] })