4

I want to filter a dimension on its properties.
My Dimension consists of various categories with parent Leaf-categories. Each Category has an online status (true or false). Within the dimension I define the property "is_online". Now I want to filter the category-tree by status [is_online] = true

My current MDX is:

SELECT
  FILTER(
    [Categories].allmembers,
    [categories].CurrentMember.properties("is_online") = 'true' 
  ) on 0
FROM [Cube]

I get this error:

Property(): the property 'is_online' was not found

Does anyone know a solution? My Version of IcCube is V 5.1.6

Dimension & Property definition

Syscall
  • 19,327
  • 10
  • 37
  • 52
David
  • 41
  • 1
  • 3

3 Answers3

0

Do you need another [categories] for it to function?

SELECT
  FILTER(
    [Categories].allmembers,
    [Categories].[Categories].CurrentMember.properties("is_online") = 'true' 
  ) on 0
FROM [Cube];

Maybe HAVING helps:

WITH 
  MEMBER [Measures].[online] AS 
    [categories].currentmember.Properties('is_online') 
SELECT 
  [categories].ALLMEMBERS HAVING 
  [Measures].[online] = 'True' ON 0
 ,[Measures].[online] ON 1
FROM [Cube];
whytheq
  • 34,466
  • 65
  • 172
  • 267
0

A member of [Categories].allmembers is missing the property "is_online".

My educated guess would be the [All] member that if default has no user defined properties.

Maybe something like :

SELECT
 FILTER(
  [Categories].allmembers,
  [Categories].CurrentMember.isAll = false 
  AND
  [Categories].CurrentMember.properties("is_online") = 'true' 
  ) on 0
FROM [Cube]

We'll improve the error message in the following version (issues)

ic3
  • 7,917
  • 14
  • 67
  • 115
0

Even though this is an old post. Please try replacing the _ in the property name with a space. Eg: "is online".

Jose Tuttu
  • 418
  • 5
  • 15