Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

Comparing the "line" results of two Cubesets- is it possible?

$
0
0

Hi all-

I had asked this previously- I'm going to try again and hopefully be clearer about what I'm hoping to accomplish. I'm open to any way to accomplish this, although in the best possible world I'd be able to keep it inside one or more cubeformulas using MDX as needed.

Using Cubeset, I can grab a slice of an AS cube. For this example I'll use [locations] and [Jan 2014]. The resulting cubeset has 3 items: 

Rock City

Orlando

Boston

Now I want to compare two measures for equality (by location), without building a pivot table or creating a cell for each of the returned locations (some cubesets will be quite large).

For example, it is important that [Hours worked] and [Hours paid] are equal. I don't want to know if the overall sums are equal, I need to know if they are equal for each item in the Cubeset;

                  Worked      Paid

Rock City       220          220

Orlando          517          516

Boston           391          392

Total           1128        1128

So in this example, the grand total is the same, but my comparison should return a False/failed result because one location paid more than they should have, and someone at the other location got underpaid.

What is the best way to compare measures at a "line item" (cubeset) level without powerpivot or pivot tables? I'd even take a VBA solution over a pivot table- I'm good with VBA, although it would still be another learning curve for me to learn how to access the AS cube more directly and make these comparisons in VBA.

One additional complication- for some measures, I will need to round (or roundup) the individual values before comparison. If a person works 8.97 hours, we are going to pay them for 9. For other measures it will be a normal rounding to zero decimals, to smooth out calculation differences.

If I can get the individual line item comparison but not the rounding, I'll ask the cube folks to add rounded measures to the cube for me, so that is my backup plan if it is possible to do the comparison but not the rounding.

I appreciate any/all suggestions on how to do this comparison, starting from the existing cubesets!


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>