question

astha avatar image
astha asked

Can some one help me to use union on the following mdx query to combine all 4 queries into one and get report with all the dates and counts.

//Closed Count

SELECT {[Closed Date].[PK Date].[PK Date].Members} ON COLUMNS, {[Master Info].[Status].&[Closed]} ON ROWS FROM [MYCUBE] WHERE ({[Closed Date].[Year].&[2020-01-01T00:00:00]}, {[Closed Date].[Month].&[2020-04-01T00:00:00]})

//New Count

SELECT NON EMPTY {[Dor].[PK Date].[PK Date].Members} ON COLUMNS, NON EMPTY {[Measures].[Master Count]} ON ROWS FROM [MYCUBE] WHERE CrossJoin({[Dor].[Year].&[2020-01-01T00:00:00]}, {[Dor].[Month].&[2020-04-01T00:00:00]})

//open Count

SELECT NON EMPTY {[Dor].[PK Date].[PK Date].Members} ON COLUMNS, NON EMPTY {[Referral Info].[Status].&[Open]} ON ROWS FROM [MYCUBE] WHERE CrossJoin({[Dor].[Year].&[2020-01-01T00:00:00]}, {[Dor].[Month].&[2020-04-01T00:00:00]})

//Invoice Count

SELECT {[Invoice Date].[PK Date].[PK Date].Members} ON COLUMNS, {[Measures].[Invoice Count]} ON ROWS FROM [MYCUBE] WHERE CrossJoin({[Invoice Date].[Year].&[2020-01-01T00:00:00]}, {[Invoice Date].[Month].&[2020-04-01T00:00:00]})

ssasmdx
cubeissue.png (33.3 KiB)
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.