Business Intelligence Blogs

View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.

«September 2015»
MonTueWedThuFriSatSun
31123

Executing DBCC for SQL Server Analysis Services 2016

In the upcoming release of SQL Server Analysis Services 2016, one of the new features you’ll see is the ability to perform a database consistency check against your SSAS cubes and Tabular models. Just like in the database engine side of things, DBCC for SSAS checks for corruption across the entire database or individual objects within the database.

The DBCC command is shaped likes the XMLA Process command so there’s not a lot of complexity to it. Below here, you can see the basic syntax for the SSAS DBCC command. Its worthing noting that the syntax of the command will look the same whether you’re running it against an SSAS multidimensional database or Tabular model.

"http://schemas.microsoft.com/analysisservices/2003/engine">
    <Object>
        
        
        
        
    Object>

To run the DBCC command, just open a new MDX query window and use the code seen above. Enter in the IDs of your Database, cube, measure and/or partition.

When you’re running the DBCC command against a Tabular model, there are a couple things I’d like to point out.

In the element for the CubeID, you’ll need to specify the ID of the Model. And in the element for the MeasureGroupID, specify the ID for the table you want to check.

DBCC XMLA command for SSAS

If you want to check the whole database or model for consistency, simply remove the elements the lower elements. For example, if I wanted to check the whole model, I just would leave out the elements for MeasureGroupID and PartitionID.

To find the MeasureGroupID (Table ID) or PartitionID in a Tabular model, just navigate to the Properties for that object.

Find the SSAS Tabular MeasureGroup ID or Table ID

To find the Partition ID in a Tabular model, right click the table and select Partitions. Then highlight the partition you want to check and click the Settings icon.

Find the SSAS Tabular partition ID

If you run SQL Server Profiler against SSAS while executing the DBCC command, you can see the individual checking of the columns, tables, database and more.

SSAS Tabular Profiler trace DBCC

I also ran a trace against my SSAS 2016 OLAP instance to watch each segment of

Read more
456
78910111213
14151617181920
21222324252627
2829301234
567891011

How to Make a Box Plot Chart in SQL Reporting Services 2008 SSRS

  • 12 November 2009
  • Author: MikeDavis
  • Number of views: 55454
  • 0 Comments

In SQL server 2008 there are several new chart options. The Box Plot Chart or, Box and Whiskers Chart, or Candle Chart need a few calculations to make the chart work. The chart is made to show a series of numbers. Most box plot charts look like:

Box Plot Chart

This is a representation of a series of numeric data broken down by date. To explain how the chart is made we need to understand how the numbers are calculated. Lets assume on one day we have the numbers (3,7,8,9,12,15,16,19,21,25,22,23,26,30,35). We need five values from this field, Median, Max, Min, Lower Quartile and Upper Quartile. We may also have numbers that could be consider outliers if they are too large or small compared to the rest of the numbers. Usually this is 1.5 times the nearest Quartile.

The median is the number in the center of the numbers. In our example we have 15 numbers. The center number is the eighth digit which is 19. If the series of number is an even amount then the number would and average of the two center numbers. So if there are 14 numbers in the series the 6th and 7th digits would be averaged together to get the median.

The next two numbers are the quartiles. These are the numbers half way between the median and the the highest and lowest numbers. Again if there are an even amount of numbers you take the average of the two center numbers. In our example the lower quartiles is 9 and the upper quartile is 23.

The last two numbers are the minimum and maximum , in this case 3 and 35 respectfully.

Once we have these numbers we can build the Box Plot chart. Reporting services does not do a good job of calculating these numbers. The best thing to do is have analysis services calculate these for you or use a stored procedure to produce them. Lets assume we have a table that has these numbers calculated like so:

Box Plot Chart

Q1 is the Lower Quartile, Q2 is the upper Quartile.

Now we create a report with a data source and a dataset querying all the data from this table.

Next we drag in a chart to the report and select the Box Plot Chart.

Box Plot Chart

Then we drag the Date Column from our Dataset into the Category field below the chart.

Box Plot Chart

Then we drag the Max Column from our Dataset into the Data Fields above the chart.

Box Plot Chart

Then right click on the [Sum(#Max)] Grey box that was created in the Data Fields above the chart and select Series Properties.

Box Plot Chart

Click on the function button next to the fields and set the High Value to Max, set Low to Min, set Open to the Lower Quartile(Q1), and set Close to the upper Quartile(Q2).

Box Plot Chart

Adjust the formatting of the X and Y axis as desired and the labels and the chart should look like so:

Box Plot Chart

If we want the Median to show on the chart we need to add it as another series to the chart. Drag the median column from the dataset into the Data fields above the chart. Make sure you do not drop it on one of the existing series, place it to the right of them. It automatically sets it to Sum(median), we need to change this so it is just the median field. Right click on the Median series and select Series Properties.

Box Plot Chart

Click on the function box next to the High value and change the function to =(Fields!Median.Value). Then Click on the markers node on the left and select the desired marker type, size and color. Click on the fill node and set the color to no color. This will stop the line from appearing below the median. The report should look like so:

Box Plot Chart

To add the Outliers. We follow the same steps we did to add the median markers. Make sure to set the fill to no color.

The final results look like so:

Box Plot Chart

I removed the max field from the legend also. I did this by right clicking on one of the blue boxes and click series properties and setting the legend to do not show.

Print
Tags:
Rate this article:
No rating
MikeDavis

MikeDavisMikeDavis

Other posts by MikeDavis

Please login or register to post comments.