Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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!