Friday, December 14, 2012

What-If analysis – Various ways to implement using MSBI

Presently I am working on the What-If analysis capability in MSBI. So I went ahead on researching on what are the various ways we could implement What-If analysis in MSBI.

Per my current research, there are three ways we could be able to achieve What-If analysis. (If there are more options, Please feel free to add in the comments of this blog)

1.       Using Excel – Allowing user to modify the Cells values in the Pivot Table.

2.       Using Excel – With Predefined Slicer Values.

3.       Using SSRS – With Predefined Slicer Values.

Using Excel – Allowing user to modify the Cells values in the Pivot Table
  • We need to enable the Write back option in the cube partition in order to do the what-If analysis.
  • User can directly change the values in the cells to see the impact
  • User can change the value at the higher level at a hierarchy also. For example, What-if the sales from one quarter should be moved to other quarter.

 Using Excel – With Predefined Slicer Values
  • We do not need the write back option to be enabled.
  • We need Excel 2010 and above to use this. Use Insert Slicer to use a slicer as shown below.
  • User can just select the Slicer dimension attributes to see the impact.

Using SSRS – With Predefined Slicer Values.
  • Very similar to the previous one. But it will be a static report in SSRS
  • The slicer will be the parameters. The parameter needs to be chosen and click on generate report will show the impact.


Also 2 weeks back power view for SSAS multidimensional CTP has been released.
 I will work on that also to understand the What-If capabilities in power view. I am pretty sure we can generate even better interactive analysis.

Saturday, November 3, 2012

SSRS – Easy way to create Stepped Tree Reports

Recently I was asked to create a report in which the user should be able to see a tree kind of structure for each level in geography with expanding & collapsing capability and summary at the each level.  User wanted to have all the level values in the same column. We have designed, developed and delivered the report.
Below is a sample report of the same kind.

After that for another client I was asked to prepare for a demo on Adhoc querying capability. When I was working in report builder I was surprised to see the capability of creating such report using the wizard itself in a pretty simple way.

Below are the steps to create this kind of report

     1.  Launch the report manager URL and open the report builder tool.

     2. Choose the Table or Matrix report from the window and proceed further in the wizard by selecting existing Data set or create a new one by using query designer or existing query.
     3.  For this demo i have chosen the Geography columns to be on the row groups and Date columns on the column group with sales value on the values.

    4. In the next screen , there are 3 options shown as below. Choose Stepped , Sub total above . Also check the Expand \ Colapse groups check box.

   5. In the next step choose a style as you want and click finish . For this demo , Ocean has been used.

   6. Now , the report is ready for above specification tree structure in single column with expand \ colapse feature with total & subtotal at each level. This will for sure will save some development effort when we do reports in such format.
   Then , i was thinking why this feature is not available in our BI Development studio wizard and i could find an option "Enable Drill down" in the window where we choose page level and group level columns.

  But with this option it is possible to have expand and collapse capability as blocked. But not stepped as per our requirement. Also the Subtotal and total are not displayed.


        Using the Report Builder Wizard , we will be able to build reports of below three styles

                                  1. Blocked Sub total Below.
                                  2. Blocked Sub total Above.
                                  3. Stepped Sub total Above.

        Report Builder is primarily meant for business users to generate Adhoc reports. But at times developers also can make use of this wizard to save the development effort needed to generate such report manually.Hope this information is helpful. Will meet you all next week with another blog. Till then take care and Bah bye !!!

Friday, October 26, 2012

Microsoft HDInsight Server for Big Data

Microsoft has release HDInsight server for BigData which is Apache Hadoop Compatible. This is released in two variants

HDInsight Server for Windows Server.
HDInsight Services for Windows Azure.

Both of this are available for download and sign up in the below link

Also you can do a read about HortonWorks

I am also pretty much excited about this product. I am very sure Microsoft would have made this very user friendly in its style as like its other products. Planning to try out this in forthcoming weeks and will share the learnings here. Will meet you all next week and hope with a detailed blog. Till then Bah Bye.

Friday, October 19, 2012

SSAS - Understanding Non Aggregate Measures

Recently I have been asked a question, I have defined my measure with aggregate function as “None” and all the values are returned as Blank. What is the reason for this? So I have created a below demo to explain the concept of “None” aggregate function and how it works. Most you may be having the same question. So I am documenting this here to help you to understand about this.

Below is the sample model which will be used for demonstrating this

I have created a cube using the wizard with the above data model.  Below is the structure of the cube

Dimension : Product 
Attributes :ProductId
Dimension : Region
                Attributes :RegionID
Dimension :Chk  (Dummy Dimension)
                Attributes :ChkId
Measures : Sum(SoldQty)
                BillNumber (No aggregate)
Measures :  Sum(Valx) (Dummy Measure)

The cube is deployed and processed. Now in the browser, let us take a look how this measure behaves.
Now when using Region Dimension alone measure BillNumber is returning blank.

Now let us try adding the Product Dimension also inside. But still we could see only blanks in the BillNumber.

But if you try expanding for each region you will start seeing the Billnumber values.

The reason for this is in the first two tries there was an attribute at the level “All” . As we have mentioned BillNumber as NoAggregate , there will not be any value available for a “All” member.
Now you may get a question that in the first screenshot we have used Region at the granular level only. But why BillNumber is still Blank ?  As RegionId has been used in the query , by default ProductId will be at the “All” level. In the below MDX query , the product dimension is not used in the query , But by default it “All” member has been  considered for getting the values.

But in the last screen shot , we have the leaf level of all the attributes available in the cube so the BillNumber measure displays the value.Does this means do we need all the dimension attributes in the query to display the no aggregate measure ? Not necessary if you notice we have one other dummy dimension DimChk and other dimension attribute Color also. Without using the chk dimension attributes they will be considered as All member. But still we are getting the BillNumber measure displaying the value.This makes clear that we need to have attributes which is having the IDs as keys which are linked to the fact table which has this measure. In the above example if we use the ProductID&RegionIDattributes , No aggregate measure BillNumber will display the value.

If we remove one of the key attribute values, the bill number will start displaying Blank.


No Aggregate Measures will display values only when attributes with all keys linked to the fact is available in the MDX query or browser as it displays the leaf level data.

I have uploaded the SSAS project and relevant scripts in the below link for your reference.

Hope this blog is helpful .Will meet you next week with another blog. So far I am happy that I could keep up my resolution on doing a blog per week and hope I will be able to keep it up JJJJ.

Saturday, October 13, 2012

Query Full-Text Catalog and Index details from system tables

This week both personal and official work kept me so busy and couldn’t get time to do a brief blog. But recently I have started learning about Full-Text search and was able to create a utility script for getting the Full-Text Catalog and Index details. I have posted the script in Tech Net and available for download in the below link. Hope this is helpful.

Signing off hoping to meet you with a brief blog next week. Till then Bah Bye!!!

Thursday, October 4, 2012

SSAS – How to create User Defined member properties

SSAS – How to create User Defined member properties

It has been a long time since I wrote a blog as I was so very busy with other priorities. It feels so better to be back into this. Hope I will be able to blog frequently from now on.

Recently I have encountered a question in MSDN forums with a question how to create multiple caption for a member due to the reporting needs. As this is just for reporting purpose I have recommended creating them as User Defined member property. When I went ahead and searched in the internet for an article to provide step by step of this I couldn’t find one. So I decided to document it here so that it will be useful for all.

What is Member property?
Member properties cover the basic information about each member in each tuple. For example you need additional information on a member in a tuple of State Province code on State- Province attribute in the Geography Dimension in Adventureworks. But you don’t need any aggregation on that. For this scenario you can create this State Province code as member property for the State province so that it can be used for reporting purpose and it will not take more space in the cube as there is no aggregation for this property. Now let us take the above example itself and see how this can be achieved step by step.

Steps to create a member property
     1. Open the Adventure works solution for SQL Server 2008 R2
     2. Launch solution explorer and open the Geogrpahy dimension which we will be using as an example in this step by step

    3. Right click on the State province code column in Data Source View section and select New Attribute from column. Instead you can drag and drop this column into the attributes section.

     4.The attribute State Province code will appear in the attributes section under the Geography. Right click on Stateprovincecode attribute and select properties.Also you can hit F4 to display the property window.

     5.On the properties window change the below property values


     6.Move to the attribute relationship tab , you will see by default State Province code is added under GeographyID. But we need to add this attribute as member property to State Province.

7.  Right click on the relationship in attribute relationships tab and say edit relationship. Change the Source attribute to State-Province.

     8.Now you can see the relationship changes reflected in the attribute relationship tab.

9.  With this the required changes are done and now we need to Deploy & process the cube.From the project à Build menu choose Deploy the cube.
    10.   Once the deployment and process is done , Double click on the cube and move to cube browser tab. In the left measure group pane , expand the Geography àState Province à Member properties. There you will be able to see the state province code added as a member property.

11.   Now you will be able to use this member property in your MDX queries as shown below

   MEMBER [Measures].[State Province Code] AS
  [Geography].[State-Province].Properties( "State Province Code" )
   [Measures].[State Province Code] ON COLUMNS,
   [Geography].[State-Province].[State-Province]  ON ROWS
FROM [Adventure Works]


Member properties will be handy when only used for reporting purpose without any aggregation. These member properties will not occupy any space in the cube as there is no aggregation or indexing done on these properties and it will be stored with in the dimension. As side effect of no indexes on these attributes querying member properties may be slow. But for sure this will help in terms of processing and cube size.

Hope this article is helpful. Will meet you soon with one more article next week as I have resolved to write one article a week.