I am wondering if there is a way to query more than one cube in a single mdx statement. Here's the deal - I have a cube that has a measure group that is a count of invoices, and another cube that has additional measures / dimensions of interest. The 2nd cube satisfies everything we need, except for the count of invoices. Is there a way to query the invoice cube as a calculated measure in the mdx that is querying the 2nd cube? It would be easy to add the invoice measure group to the 2nd cube, but that would increase the processing time way too much (unfortunately we have to do a full process). Here's a stupid question - would adding the measure group to another cube in the database cause two physical reads of the table? I am guessing yes, but you never know.
I read about linked dimensions / measures, but it looks like they are for measures / dimsneions in a different AS database. There probably is a simple solution for this, but I am still fairly new to AS / mdx.
thank you in advance,
John Hennesey
Hello John! I think that the best solution is to have both measure groups in the same cube, even if processing time can increase.
I have not seen an MDX select with two cubes in the From clause. Subcube statements also refer to the same cube. I am not on the top 10 MDX expert list but I think that MDX will not help.
Can you not add the invoice number to the second measure group an aggregate it with count?
Kind Regards
Thomas Ivarsson
|||
Yeah, I did some tests this morning to see how long it takes to query the invoice dimension. Look like this is the way to go!
FYI - I did find a LookupCube function, but I think this is a last resort method - much slower than designing it properly from scratch.
Thanks for your quick response -
John
No comments:
Post a Comment