3

Using the following mdx, the result is the same if I run it with or without the where clause : It returns the total nbr of years in the hierarchy.

with member nbYears as [Time].[Year].[Year].count
select nbYears on 0
from [Sales]
where [Time].[2007]
Bertrand Miot
  • 929
  • 5
  • 12

1 Answers1

2

You can use the Existing MDX function

WITH 
   member nbYears as (Existing [Time].[Year].[Year]).count
SELECT nbYears on 0
FROM [Sales]
WHERE [Time].[2007]
ic3
  • 7,917
  • 14
  • 67
  • 115