简体   繁体   中英

MDX Query Column name for Measures

have following query

select  
    non empty  
    (      
    [Dimension1].[Description].children,  
    [Dimension1].[GCode].members,  
    [Measures].[GScore Sum]   
    )  
    on columns,  
    non empty
    (
    [Dimension2].[DCode].[DCode] *  
    [Dimension2].[DName].[DName] *   
    [Dimension2.[Barcode].[Barcode] *  
    [Dimension2].[LN].[LName] *  
    [Dimension2].[FN].[FName]   

)
on rows
from 
[MCube]
where 
(

{[Dimension2].[HARC].[DCode].&[0000]}

)  

In the results [GSCORE SUM] column name repeats is eachtheir way to avoid the repeation of column name or give the unique name for EACH GLCE Code member instead of just repetting [GSCore Sum] in results or make the [Gscore Sum] invisible

http://i.stack.imgur.com/yte59.jpg

Not 100% sure what you require but have you tried adding the measure to the WHERE clause?:

select  
    non empty  
    (      
    [Dimension1].[Description].children,  
    [Dimension1].[GCode].members 
    )  
    on columns,  
    non empty
    (
    [Dimension2].[DCode].[DCode] *  
    [Dimension2].[DName].[DName] *   
    [Dimension2.[Barcode].[Barcode] *  
    [Dimension2].[LN].[LName] *  
    [Dimension2].[FN].[FName]   

)
on rows
from 
[MCube]
where 
(
[Measures].[GScore Sum],  
{[Dimension2].[HARC].[DCode].&[0000]}
) 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM