0
votes

How can I get the MDX query below to display the date next to the customer? Currently it only displays the customer, or whichever dimension I make first in the nonempty call. I'd like both to show in the results.

SELECT  {[Measures].[Count1], [Measures].[Count2], 
  [Measures].[Count3]} ON COLUMNS,                               
nonempty({[Customers]}, {[DateRange]}) ON Rows                 
FROM Cube

I tried crossjoin but that return an out of memory error.

Thanks!

I am getting this: Customer | Count1 | Count2 | Count3 |

I would like to see this: Customer | Date | Count1 | Count2 | Count3 |

1
Can you add some sample output of what you are getting and what you would like to see?Rick
Thanks! I have updated the question with what i get and I what I need to get.Eric Blair

1 Answers

0
votes

Generally a measure goes as the second argument of NONEMPTY

SELECT  {[Measures].[Count1], [Measures].[Count2], 
[Measures].[Count3]} ON COLUMNS,                               
nonempty(({[Customers]}, {[DateRange]}),{[Measures].[Count1], [Measures].[Count2], 
[Measures].[Count3]}) ON Rows                 
FROM Cube

I put all three measures as part of the set for the NonEmpty function. This would return data where any row has at least one of the three counts that isn't null. It only filters out rows that are null for all three counts.