I want to rename the columns that I am querying from the MDX query but in the DIMENSION PROPERTIES, I have tried different approaches (WITH MEMBER / WITH SET ...) but they only work for the rows/columns but not in the DIMENSION PROPERTIES clause. I was hoping to find some help from the community.
What I have in my query is the following:
WITH
MEMBER [Measures].[Closing Balance (HL)] AS [Measures].[1234123]
SELECT
{
[Measures].[Closing Balance (HL)]
}
ON AXIS(0) ,
NON EMPTY
{
[0SALES_OFF].[All].Members.Children
}
DIMENSION PROPERTIES
[0SALES_OFF].[2ZWSALER__0SALES_OFF],
[0SALES_OFF].[1ZWSALER__0SALES_OFF],
ON AXIS(1)
FROM
[TABLE_NAME]
SAP VARIABLES [ZVMONYR] INCLUDING "01.2019":"04.2019"
If I query this the resulting table looks like this:
| [0SALES_OFF].[2ZWSALER__0SALES_OFF] | [0SALES_OFF].[1ZWSALER__0SALES_OFF] | [Measures].[Closing Balance (HL)] |
|-------------------------------------|-------------------------------------|-----------------------------------|
| 111 | ONE NAME | 123.09 |
| 222 | ANOTHER NAME | 233.23 |
But what I want is to rename the columns this way:
| SALES_OFFICE_ID | SALES_OFFICE_NAME | [Measures].[Closing Balance (HL)] |
|-----------------|-------------------|-----------------------------------|
| 111 | ONE NAME | 123.09 |
| 222 | ANOTHER NAME | 233.23 |
Thank you in advanced for your help!