You are on page 1of 2

IIF ( ([Measures].[Value - Fact Attributes],[Attributes].[Code].

&[NPCTP])= 0, NULL,
(([Measures].[Value],[Indicator Unit Types].[Indicator Unit Type].&[Student]) /
([Measures].[Value - Fact Attributes],[Attributes].[Code].&[NPCTP])) )

SELECT
{ [Measures].[Total Number of declarations],
[Measures].[Weight Net], [Measures].[Value (EUR)] }
ON COLUMNS,

NON EMPTY
{ [Trailer Number].[REGOZPR].[REGOZPR].ALLMEMBERS}
*
{[Loary Number].[REGOZPS].[REGOZPS].ALLMEMBERS}
--{ [Time 38232].[Month Of Transaction]}

ON ROWS

FROM [3_2]

WHERE (
--[Time 38232].[Month Of Transaction].&[2012-12],
[Time 38232].[Day Of Transaction].&[2012-12-01T00:00:00],
--[Customs House].[LONG NAME].&[ 11029 - CARINSKA ISPOSTAVA LUKA BEOGRAD],
[Customs House].[Hierarchy 1].[CACA].&[ 17 - C-CA KRAGUJEVAC].&[ 17345 -
CARINSKA ISPOSTAVA SMEDEREVO]
,[COMPANIES].[Company Tin].&[102011962],
-- [Type Of Declaration Dim Nq].[VRSTADEKL].DEFAULTMEMBER
[Type Of Declaration Dim Nq].[VRSTADEKL].&[]
)

http://ucv-bi06/Dashboards/Forms/AllItems.aspx

--WITH MEMBER [Measures].[TEST] AS


--case when ISEMPTY( [Measures].[CENA] ) then NULL else [Measures].[CENA] end +
--case when ISEMPTY( [Measures].[CENA - Fact 3 2 10] ) then NULL else
[Measures].[CENA - Fact 3 2 10] end

SELECT
{ [Measures].[Value (EUR)], [Measures].[Total Number of declarations]
-- [Measures].[TEST]
}
ON COLUMNS,

NON EMPTY
{[Trailer Number].[REGOZPR].[REGOZPR].ALLMEMBERS}
*
{[Loary Number].[REGOZPS].[REGOZPS].ALLMEMBERS }
--{ [Time 38232].[Month Of Transaction]}

ON ROWS

FROM [3_2]
WHERE (
[Time 38232].[Month Of Transaction].&[2012-12],
--[Time 38232].[Day Of Transaction].&[2012-12-01T00:00:00],
--[Customs House].[LONG NAME].&[ 11029 - CARINSKA ISPOSTAVA LUKA BEOGRAD],
[Customs House].[Hierarchy 1].[CACA].&[ 17 - C-CA KRAGUJEVAC].&[ 17345
- CARINSKA ISPOSTAVA SMEDEREVO],
[COMPANIES].[Company Tin].&[102011962]
-- [Type Of Declaration Dim Nq].[VRSTADEKL].DEFAULTMEMBER
--[Type Of Declaration Dim Nq].[VRSTADEKL].&[]
)

http://connect.microsoft.com/SQLServer/feedback/details/448127/mdx-needs-a-
special-division-by-zero-operator

----------------

WITH MEMBER [Measures].[TEST] AS


CASE
WHEN [Decl Type Dim Nq].[VRSTAISP].Value = [Decl Type Dim Nq].
[VRSTAISP].&[C1]
OR [Decl Type Dim Nq].[VRSTAISP].Value = [Decl Type Dim Nq].[VRSTAISP].&[C2]
OR
[Decl Type Dim Nq].[VRSTAISP].Value = [Decl Type Dim Nq].[VRSTAISP].&[C3]
THEN [Measures].[CENA] ELSE [Measures].[CAROSN]
END

SELECT
{ [Measures].[CENA], [Measures].[CAROSN], [Measures].[TEST]
}
ON COLUMNS,

NON EMPTY
{[Decl Type Dim Nq].[VRSTAISP].Allmembers }

ON ROWS

FROM [325]

WHERE (

[Time 38232].[Month Of Transaction].&[2012-12],


--[Customs House].[Hierarchy 1].[CACA].&[ 17 - C-CA KRAGUJEVAC].&[ 17345
- CARINSKA ISPOSTAVA SMEDEREVO],
[COMPANIES].[Company Tin].&[102011962]
-- [Type Of Declaration Dim Nq].[VRSTADEKL].DEFAULTMEMBER
--[Type Of Declaration Dim Nq].[VRSTADEKL].&[]
)

-- 100000266 102011962

You might also like