0

I am trying to get a subtotal in MDX on a separate column. Example below:

This is what I current have:

Table

This is what I am looking for:

Looking for this

If someone could please help me?

Currently this is the code I am using: (I ALSO HAVE A SALES PER HOUR COLUMN WHICH I FORGOT TO ADD IN THE IMAGE)

WITH 
MEMBER [MEASURES].[SALES PER HOUR] AS [Measures].[Sales Amount]/[Measures].[Hours]
MEMBER [MEASURES].[SUBTOTAL_Sales] AS 
([EMPLOYEE].[EMPLOYEE].CurrentMember.Parent, 
[Location].[Location].CurrentMember.Parent, 
[Measures].[Sales Amount])
SELECT
NON EMPTY
{
([MEASURES].[SALES HOUR]), 
([Measures].[Sales Amount]), 
([MEASURES].[SUBTOTAL])
} ON COLUMNS
,
NON EMPTY
{
([DATE].[YEAR].[2022],
[EMPLOYEE].[EMPLOYEE].[EMPLOYEE],
[LOCATION].[LOCATION].[Location])
} ON ROWS
FROM [CUBE]

With the above MDX code, I am getting the Employee Sales for every single Location in the business eve when its a NULL. Not sure why

Could someone please help

0 Answers0