BookmarkSubscribeRSS Feed
metalray
Calcite | Level 5
Hello,

if I use the following MDX query in the Enterprise Guide OLAP View it takes one second to show me the result.
On the other hand, if I implement it in a stored process, it does not complete. I am running it since 5 minutes now and now success.
I would be very happy for any improvement suggestions.
(the proc print does not work either).

proc sql;
connect to olap (host= myhost.com port=52221 protocol=bridge user=test
pass="{sasenc}4dasdade" repository= Foundation olap-schema="OLAP Schema");

/* pass thru to OLAP line */
create table work.MDXOut as select * from connection to olap
(
/* My MDX Code goes here */



SELECT
CrossJoin(CrossJoin(Hierarchize({ [DIM_KPI].[All DIM_KPI].[TotalSales].[SalesforMarkets],
[DIM_KPI].[All DIM_KPI].[TotalSales].[SalesforMarkets].Children }), { [MEASURES].[FACTSUM] }),
{ [DIM_PERIOD].[All DIM_PERIOD.[2010] }) ON COLUMNS,
Hierarchize({ [DIM_SALES].[All DIM_SALES].[Agencies, [DIM_SALES].[All DIM_SALES].[Agencies].Children,
[DIM_SALES].[All DIM_SALES].[Agencies].[AgenciesUSA].Children }) ON ROWS
FROM
[testcube]




/* End of MDX Code */

disconnect from olap;
/* Disconnect from the OLAP Server */
quit;


Proc print data=work.MDXOut;
var [SalesforMarkets];

run;
1 REPLY 1
metalray
Calcite | Level 5
nearly two hours have passed and no result. I stopped the program in EG 4.2. I got the port number wrong 😞 - no error message to indicate there was a connection problem.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 815 views
  • 0 likes
  • 1 in conversation