Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Alias Name for MDX Query

Hi All,

How can i write Alias name in MDX query?

For eg., I have the query like this

SELECT



{

[Measures].[USD],

[Measures].[USD - Fct Budget],

[Measures].[USD - Fct Forecast],

[Measures].[FullYearActual],

[Measures].[FullYearBudget_vs_PriorFullYearActuals],

[Measures].[PriorYearActuals]

}

DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS , NON EMPTY

{[Dim Account Main3].[Account Key].Children}

ON ROWS

FROM [IB Test]

;

I want to give "Alias" name to all the measures here. Bcoz i am using the same measures in few more tables. Due to this i am getting synthetic key error in qlikview.

Thanks in advance.

Rgds,

Nandha

2 Replies
er_mohit
Master II
Master II

hii

firstly load your all tables from sql then on abovewrite load and within this load write fields which you want to alias like below.

Load

   [POST_GJAHR] ,

   [BELNR_CN] ,

   [BELNR_CN_CANC] ,

    BUDAT_CN,

   [VBELN],

   BUDAT,

   BELNR,

   POST_ACC_AMOUNT as Debit_Credit_Amount,

   KUNAG as KUNNR,

   KUNNR as NewKUNNR,

   BLART

    ;

SQL Select VBELN BELNR_CN POST_GJAHR BELNR_CN_CANC BUDAT_CN BUDAT BELNR POST_ACC_AMOUNT KUNAG BLART KUNNR from ZREBATE

;

hope it helps

Not applicable
Author

Hi,

Try to store everything in a qvd and the load again in this way:

Load

" [Measures].[USD]" as name1,

"[Measures].[USD - Fct Budget]" as name2,

"[Measures].[USD - Fct Forecast]" as name3,

"[Measures].[FullYearActual]" as name4

...and so on...

Let me know!