SSAS -> AdventureWorks Example -> Using the browser to splice a measure by week, shows results that have two of the same week records?

StackOverflow https://stackoverflow.com/questions/8980408

Question

I have been working on a cube and noticed that when I am browsing measures in my cube by weeks, I am getting an unexpected result, but first let me display my current scenario. I am looking at counts of a fact load by weeks. When I do so I am getting results like these. :

Weeks | Fact Internet Sales Count 
2001-07-01 00:00:00.000 | 28    
2001-07-08 00:00:00.000 | 29 

....and so on as you would expect.

Further down I noticed this. :

2001-09-30 00:00:00.000 | 10    
2001-09-30 00:00:00.000 | 24

As you can see, it shows the week twice with different counts, when you add these counts together it is the correct number of counts for this week (i.e. 34).

I am just confused why it is showing two weeks, when I look at the data in sql I can see that the difference in data between these two is strictly the month in which these dates fell (10 in the earliest month and 24 and the later month in any example).

I initially saw this in my original cube that I created on my own, in turn, I pulled up trusty adventureWorks practice cube and found that it was present in that cube also.

Was it helpful?

Solution

This is due to the fact that within this date hierarchy, the lowest attribute in the hierarchy was date not week. Therefore, there was always a split for weeks by date. This can be alleviated by making a date hierarchy with week as the lowest portion of a date hierarchy.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top