MDX query with a DMX query

Hi All,

Do I have a way to run a MDX query with a DMX query? (Avoiding the link server options )

I need to get the cube last update date like this DMX query:

SELECT 1 as CubeStatus

FROM $System.MDSCHEMA_CUBES

where  format(LAST_DATA_UPDATE, 'dd/MM/yyyy') = format(now(), 'dd/MM/yyyy'--"1" means that the cube was processed, NULL cube did not process today

and cube_source = 1

and cross reference it to a result I get from this MDX query:

 

with member measures.LastDateCube as [Comm Date UTC].[Date].currentmember.PROPERTIES("KEY")

select measures.LastDateCube on 0 from comms

the purpose of this is to know for sure that my current member (date integer) is equal to the cube last update date. thus, making sure the cube was processed and I get the correct member I expect.

What do you think?

Thank you

Yoni.

March 22nd, 2015 10:48am

Hi yonibiel,

According to your description, you want to combine a DMX query with a MDX query. Right?

In SQL Server, it is not supported to parse the MDX query without connecting the SSAS database server. So if you want to combine the DMX and MDX query into one dataset, the only way is using linked server to SSAS in openquery() function.

In this scenario, if you render these data from two result sets for reporting purpose, I assume you using SSRS, you can create two datasets and use lookup() to combine data fields from two datasets into one data region.

Reference:
Joining the results of two MDX queries together

Best Regards,

Free Windows Admin Tool Kit Click here and download it now
March 23rd, 2015 8:08am

Thanks Simon, unfortunately im not using SSRS and i know but can't use the link server option.

regards.

Yoni

March 23rd, 2015 11:33am

Is it a Multidimensional cube rather than Tabular? Can you deploy ASSP and use this sproc? http://asstoredprocedures.codeplex.com/wikipage?title=CubeInfo&referringTitl
April 5th, 2015 3:37am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics