Created measure from a dimension is always empty

Hi,

I’ve created a cube from an excel file and created a set of different dimensions. One is status where I’ve 4 different status:

  • Active
  • New
  • Fixed
  • Re-Opened

but when I tried to create a specific measure for each status to present the it’s total a (time)Line chart it doesn’t work.
I’ve tried different approaches without any success.
Example:

count(
  Filter (Descendants ([Status].CurrentMember, [Status].[Status]),
  [Measures].[Issues Reported] > 0 and
  [Status].CurrentMember.Name = 'Fixed'
  )
)

Another example tried:
CASE when [Status].CurrentMember.getBoolean(‘Fixed’)
THEN ‘1’
ELSE ‘0’
END

Thanks,
Henrique

Well apparently it is possible with:
([Measures].[Issues Reported],
[Status].[Fixed])

:sweat_smile:

1 Like

It is great you found a solution by yourself.

The tuple is the best formula you can come up with in this case.

You were close with the formula within the function descendants as well. While the tuple is anyway the best one here. Here is a tip on how to get it working with the descendants as well.

You are iterating through a set of Status members. The function Count will count members. In this case how many Statuses have a name Fixed and have value in Issues reported. The formula might give you a value of 1. It will count one status Fixed if you have any reported issues in this status.

If you would like to count Issues reported with this status, you would like to use a function Sum and use measure Issues reported as a numeric argument for function Sum:

Sum(
  Filter (Descendants ([Status].CurrentMember, [Status].[Status]),
  [Status].CurrentMember.Name = 'Fixed'
  ),
  [Measures].[Issues created] 
)

Daina / eazybi.com

Thanks Daina,
It is more clear to me know what I’ve missed the 1st time.