0

I've created market basket analysis cube and I'v tried to create query that return cross join of two hierarchies ( they are identical ) and gets the results without intersection. Unfortunately I can't get correct results.

Problem: I have 2 sets: A {a,b} and B {a,b} and I want to create new set { {a,b} } or at least { {a,b} {b,a} }

My query:

SELECT 
   { [Measures].[Transaction Count] }  ON COLUMNS, 
 TopCount(
    { 
                    Generate( {[Product].[Product Id].CurrentMember} as MyCellSet,
              FILTER(Existing(NonEmptyCrossJoin (
                            [Product].[Product Id].[Product Id], 
                            [Product 1].[Product Id].[Product Id]
                         )),[Product 1].[Product Id].CurrentMember.Name <> MyCellSet.CurrentMember.Name))
    },
    1000,
    [Measures].[Transaction Count]
 ) ON ROWS FROM [Market 1]

Do you have any idea how to redesign above query to get results that looks like cross join without intersection?

Jonathan Lonowski
  • 121,453
  • 34
  • 200
  • 199

0 Answers0