Wednesday, December 21, 2016

MDX select difference between two date dimesions

I wanted to select difference between two date dimensions in MDX, where value of a KPI measure is not empty, after some tries I could figure out the query as seen below:

  WITH
MEMBER[Measures].[dif] as Datediff("d",[Delivery Date].[Date].currentmember.MEMBERVALUE,[Ship Date].[Date].currentmember.MEMBERVALUE)
SELECT NON EMPTY { [Measures].[dif], KPIValue("Product Gross Profit Margin") } ON COLUMNS,  { NonEmpty
    ([Delivery Date].[Date].[Date].ALLMEMBERS * [Ship Date].[Date].[Date].ALLMEMBERS, KPIValue("Product Gross Profit Margin") ) }

ON ROWS FROM [Adventure Works]


No comments:

SSL Error - The connection for this site is not secure

 After cloning a git repo of dot net framework website and trying to run it all I could see was this error Turns out the fix was to simply e...