Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7009463
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T21:51:55+00:00 2026-05-27T21:51:55+00:00

Here I came up with a scenario while developing a report, I need to

  • 0

Here I came up with a scenario while developing a report, I need to group the result set first with a custom name and then year.

WITH MEMBER [measures].[Previous Year Internet Sales Amount]
AS
(
[Measures].[Internet Sales Amount],
PARALLELPERIOD
([Date].[Calendar Year].[Calendar Year], 1, [Date].[Calendar Year].CurrentMember)
),FORMAT_STRING = “Currency”

MEMBER [measures].[Varience] AS
(
[Measures].[Internet Sales Amount] – [measures].[Previous Year Internet Sales Amount]
)
MEMBER [Measures].[PercentageVarience] AS
(
CASE WHEN [measures].[Previous Year Internet Sales Amount] IS NULL OR ISEMPTY([measures].[Previous Year Internet Sales Amount]) THEN 1
WHEN [measures].[Internet Sales Amount] IS NULL THEN -100
ELSE [measures].[Varience]
/
[measures].[Previous Year Internet Sales Amount]
END )
,FORMAT_STRING = “Percent”
MEMBER [measures].[Previous Year Internet Order Count]
AS
(
[Measures].[Internet Order Count],
PARALLELPERIOD
([Date].[Calendar Year].[Calendar Year], 1, [Date].[Calendar Year].CurrentMember)
)

MEMBER [measures].[Order Count Varience] AS
(
[Measures].[Internet Order Count] – [measures].[Previous Year Internet Order Count]
)
MEMBER [Measures].[Order Count PercentageVarience] AS
(
CASE WHEN [measures].[Previous Year Internet Order Count] IS NULL OR ISEMPTY([measures].[Previous Year Internet Order Count]) THEN 1
WHEN [measures].[Internet Order Count] IS NULL THEN -1
ELSE [measures].[Order Count Varience]
/
[measures].[Previous Year Internet Order Count]
END )
,FORMAT_STRING = “Percent”

SELECT {[measures].[Previous Year Internet Sales Amount],[Measures].[Internet Sales Amount]
, [measures].[Varience],[Measures].[PercentageVarience]
, [measures].[Previous Year Internet Order Count],[Measures].[Internet Order Count]
, [measures].[Order Count Varience],[Measures].[Order Count PercentageVarience]} ON COLUMNS
, [Date].[Calendar Year].children ON ROWS
FROM [Adventure Works]

The result set for the first 4 columns needs to come as [Internet Sales] and next 4 columns as [Internet Orders] so in report layer I get the group by options with custom names.
Expected output from the MDX as
enter image description here
Could you plea help me to find a way to add a group column to result set

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T21:51:56+00:00Added an answer on May 27, 2026 at 9:51 pm

    You can use fake mdx calculated members on another dimension to get your label. In our example let’s use the [Organization] dimension for this :

    WITH 
      // Does not change the value of a tuple
      MEMBER [Organization].[Organizations].[Internet Sales] as [Organization].[Organizations].defaultmember 
      MEMBER [Organization].[Organizations].[Internet Order] as [Organization].[Organizations].defaultmember
    SELET
      {[Organization].[Organizations].[Internet Sales]} * {[measures].[Previous Year Internet Sales Amount],[Measures].[Internet Sales Amount] , [measures].[Varience],[Measures].[PercentageVarience]}
      +
      {[Organization].[Organizations].[Internet Order]} * {[measures].[Previous Year Internet Order Count],[Measures].[Internet Order Count] , [measures].[Order Count Varience],[Measures].[Order Count PercentageVarience]} 
      ON 0,
    ... as your request
    

    That should get your result

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While writing functional tests for a controller, I came across a scenario where I
So here is the scenario, I am refactoring some spaghetti code. My first problem
Regexs make me cry, so, I came here for help. I'm looking for some
I came across this question on an interview questions thread. Here is the question:
I tried to compile Ercia Sadun's sample code here , but this error came
Here's my scenario - I have an SSIS job that depends on another prior
I came here to ask a simple, very beginner question regarding python. I just
If you came here from Google looking for model to dict, skip my question,
It's my first time asking here (I have visited the site several times, but
I came across a deadlock scenario which can be summarized as the StaticDeadlock class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.