Tableau are sponsoring a live webinar with Stephen Few on 23rd February; register quick! This will be well worth a listen. I’ve included the link below for you:
Posted using ShareThis
select CONVERT(date, getdate())
For today, 20th January 2010, this would provide the following result:
Here is another Analysis Services error message which I’ve seen crop up from time to time:
Errors in the OLAP storage engine: A duplicate attribute key has been found when processing: Table: ‘dbo_mytablename’, Column: ‘ColumnName’, Value: ‘UNK’. The attribute is ‘ColumnName’.
There are a number of ways to get rid of this. I’m in favour of sorting out the source, but if the source does not belong to you then it can be difficult to take the action that you might like.
1. Sort out the source.
You may not be the ‘owner’ of the source. If you are, then there must be duplicates in the source somewhere, and this will require some digging around to discover the duplicates. This should be easy to discover using basic counts and grouping in SQL, and sorting the count in descending order so that the offending keys bubble to the top of the SSMS screen.
2. Get rid of NULLS.
If amending the NULLs isn’t an option for you, then perhaps you can circumvent this issue by using a VIEW in the DSV.
Note that SSAS will convert nulls to zeros. So, if your key contains NULLs, you will end up with these items converted to zeros. Thus, if you have more than one NULL, your column will contain lots of zeros; hence the duplicate attribute key error. The conversion to zeros might well be hiding NULLS in the source system, so it’s always good to have a look in the source column.
3. Analysis Services properties
In the properties, set errorprocessing to default or change keyduplicate setting to ‘ignore’. This might be a ‘quick fix’ but it isn’t ideal since it may well result in issues later on .
I hope that helps!
In the example of the ‘World Chocolate Sales’ graph, the length and the width of the bars in the bar chart allow us to easily compare sizes. This is clearly seen in the top graph; the magnitude of worldwide chocolate sales, by company, is expressed by the length and the width of the bar. So, to illustrate, Mars Inc have the longest and widest bar, since Mars was the overall winner in terms of worldwide chocolate sales. In contrast, Kraft Foods Inc has the shortest and thinnest bar, since they were ranked last out of the top 5 chocolate vendors.
A simple sort of the worldwide chocolate sales data reveals something counter-intuitive: the sort shows that Cadbury is the second-largest company in terms of chocolate sales in the world, and additionally that Cadbury is shown to have more worldwide chocolate sales than Kraft. This analysis is further enhanced by the gradations in the bar colour, which help the viewer to identify the magnitude of sales. These gradations show that Kraft’s total sales are less than 60% of Cadbury’s worldwide total sales. This is surprising, given the recent takeover bid by Kraft. Tableau has helped us to understand this counter-intuitive feature of the data by facilitating a very simple sort. In the words of Stephen Few, ‘Don’t underestimate the power of a simple sort’ (Few, 2009, p61).
Given this surprising result in the data analysis, what further insights can be revealed regarding why Kraft, the fifth-largest chocolate company in terms of sales, is interested in taking over the second-largest chocolate seller, Cadbury? A further sort of the brand value data, as displayed in the bottom right hand gauge, might help reveal the answer to this question; the graph is given below.
It is clear to see that Kraft have a greater amount of brand value than Cadbury. Here, the magnitude of the brand value is reflected in the colour; the darker brown shows the higher value, and the lighter value shows the smaller brand value for Cadbury PLC. Further Analysis shows that each vendor has one outstanding brand which serves as an outlier, pulling up the overall average. Tableau allows the data analyst to easily add in a reference line, which shows the average. Further, a line graph has been added in order to facilitate comparison of magnitude of the brand value differences. A large version can be found by clicking here.
To show consistency with the earlier brand value finding, the brand value is ranked in two ways: Kraft Foods Inc have been placed at the top half of this graph, and Cadbury has been placed at the bottom of this graph to reveal that, overall, the brand value of Kraft was greater than that of Cadbury. This visualisation may be surprising, since it shows that Kraft’s brand value is greater than Cadbury’s brand value, even though the worldwide sales for Kraft are less than Cadbury’s.
It is also interesting to work out the brand values without looking at the company name. This has been supplied in the bottom right hand gauge entitled ‘Brand Gauge’. The example is given here:
Kraft has the greatest brand value in its Milka Range, followed by Cadbury’s Dairy Milk. It is interesting that Cadbury’s Creme Egg features on the list at all, since it is only sold for the first half of each year.
Looking forward, it is clear to see that, by purchasing Cadbury, Kraft would acquire the brand value of Dairy Milk, which is significantly higher than many of its own brands. Further, if the chocolate sale worldwide of each company was added together, this would create a new leader in chocolate sales since this would dwarf the worldwide chocolate sales of the current leader, Mars.
To summarise, two items have been covered: an analysis of recent chocolate sales and brand value data for 2008, along with some thoughts around the sales and brand value for a company combining both Kraft and Cadbury. It has been shown that Tableau as a data visualisation tool served to facilitate an understanding of the sales and brand value data, in addition to stimulating speculation over the future.
Mintel, 2010. Chocoholics Unite as Chocolate Sales Worldwide Defy Recession
Stephen Few (2009). Now You See It: Simple Visualization Techniques for Quantative Analysis (Hardcover) Analytics Press