Adding additional dimension attribute value in MDX query...

Depending on the requirements, sometimes it is necessary to do some categorizations which does not included in the dimension data. In such scenarios we may have to add a dimension attribute which currently does not exists with the dimension data.
We can do it in the MDX query as below.

WITH
 MEMBER [DimBranch].[Branch].[Dummy] AS
   '0',
   SOLVE_ORDER = 0
 SELECT
 {[Measures].[CONTRIBUTION USECASE]} ON COLUMNS,
 NON EMPTY Union(
   [DimBranch].[Branch].Members,
   {[Branch].[Dummy]}) ON ROWS
 FROM [Sales]


You can set the measure value based on the required logic.

No comments:

Post a Comment

How the transformed data is written to an output file with column headers in U-SQL...

While working with U-SQL language, I noticed that there are few ways of writing data to an output file. Let's assume the SalesDetails....