There are many, many dimensions in my cube (alongside other regular dimensions). When I want to exclude fact lines in a line count counter, I usually do something like the following in MDX
SELECT [Measures].[Row Count] on 0
FROM cube
WHERE ([dimension].[attribute].Children - [dimension].[attribute].&[value])
This may seem more complex than necessary in this simple example, but in this case WHERE, including UNIONs, can sometimes grow.
So this works for regular measurements, but now I have a multi-multidimensional measurement. If I perform the trick above, it does not give the desired result, namely, I want to exclude all rows that have this particular attribute in the many-to-many dimension.
In fact, it does exactly what MDX sets, namely, counting all rows, but ignores the specified attribute. Since a row in a fact table can have several attributes in the many-in-many set, the row will still be counted.
This is not what I need, I need to explicitly exclude rows that have a dimension attribute value. In addition, I can exclude several values. So I need something similar to T-SQL WHERE .. NOT IN (...)
I understand that I can simply subtract the resulting values ββfrom [attribute] .all and [attribute]. & [value], but this will not work with UNIONing multiple WHERE statements.
Has anyone got a good idea on how to solve this?
Thanks in advance,
Delta p>
Delta source
share