Search code examples
ssasmdxbusiness-intelligenceolap

SSAS: Show distinct count measure with unknown member


I have a measure that counts distincted ID's on some fact table. Let's say it looks like this:

[id] [linkedtableid] [datecolumn]

1 someid date1

2 someid date1

3 someid date1

4 someid date1

5 null date1

You may see that for date1 there is 5 distinct rows. But in my case it results count = 4. I thought that this can be connected somehow with UnknownMember processing, but I ended up with nothing with this assumption. I've already tried everything in my cube solution, but can't find the reason of such behavior. It seems like row with null value in it just doesn't count by distinct count function.

Also, if I fill this null value in relational DB and then reprocess the cube, all is counting correctly.

I probably missed something, maybe some option somewhere.


Solution

  • Resolved by removing unneeded relations between the measure for distinct count and dimensions. There was 2 other dimensions, one connected through direct link, one through referenced. I don't know why nulls were not calculated there, maybe because of unability to link via reference link with null-valued field.