<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>Database tech resource</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/dbtechresource/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/dbtechresource/feed.xml</link>
    <description />
    <lastBuildDate>Mon, 27 Jun 2016 02:29:25 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>Power BI desktop limitation</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/power-bi-desktop-limitation</link>
      <pubDate>Fri, 24 Jun 2016 16:55:30 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/?p=265</guid>
      <description><![CDATA[Introduction

    
        This article describes limitation of Power BI desktop tool. It is...]]></description>
      <content:encoded><![CDATA[    <h2>Introduction</h2>

    <p>
        This article describes limitation of Power BI desktop tool. It is based on my practical experience over multiple Power BI reports deliverable. This tool is continuously improving in each release. It is also possible some of limitation may improve in future release.
	This article will help Power BI developer to take decision on any implementation.
		
    </p>
       	
    <h2>Limitation of Power BI desktop</h2>
    <p>
		
		<ul>
		<li>Limited number of DAX() supported in direct query mode.</li>
		<li>We cannot automate Filter default value. Suppose if require to select specific item on filter based on expression, we cannot do this in Power BI.</li>
		<li>We cannot set Chart color dynamically. We can set it for constant axis value only.</li>
		<li>We don’t have any chart control to display secondary axis in details. We have line and clustered column chart to show only secondary axis value not its X-axis and Y-axis.</li>
		<li>Report subscription is not supported in Power BI.</li>
		<li>We cannot access Power BI report HTML value even through Power BI web API. This is the reason we cannot customize it.</li>
		<li>Date and Time Intelligence methods does not support in direct query. We need to write required formatting logic manually.</li>
		<li>Export of report is not possible. We can only export dataset in Power BI.</li>
		<li>We don’t have control over query generated for each measure or columns. Sometime report become very slow due to complex expression and lookup queries and you need to get actual query produced by Power BI through SQL Profiler.</li>
		<li>We cannot change data type of column in direct query mode. However, we can do it for measure and custom columns.</li>
		<li>Column rename (Only direct query columns) of existing report may cause report problem. You cannot set any alias for this.</li>
		<li>Accuracy of number is also big constraint in designing report. Expression in measure automatically picked data type based on values and precision. It causes problem in accuracy. For large values it will never match from SQL calculation until you don’t do it through manual typecast in SQL.</li>
		<li>Filter behaviour in Power Bi is different. When we unselect all item in filter, it assumes as Select All.</li>		
		
		</ul>
		
	</p>
	
	
    <h2>Points of Interest</h2>

    <p>This article explain limitation of Power BI desktop tool</p>

    <h2>History</h2>

    <p>No updates available </p>]]></content:encoded>
    </item>
    <item>
      <title>Unzip memory stream and load into Azure blob container</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/unzip-memory-stream-and-load-into-azure-blob-container</link>
      <pubDate>Thu, 23 Jun 2016 06:49:52 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/?p=226</guid>
      <description><![CDATA[Introduction

    
        This article is used for getting memory stream of zip file,...]]></description>
      <content:encoded><![CDATA[   <h2>Introduction</h2>

    <p>
        This article is used for getting memory stream of zip file, uncompress memory stream and load stream into Azure blob. 
		I am using Ionic.Zip namespace to uncompress the memory stream.I am reading storage credential from app.config
		
    </p>
    <p>
       <img src="https://msdnshared.blob.core.windows.net/media/2016/06/appconfig-300x110.jpg" alt="appconfig" width="300" height="110" class="alignnone size-medium wp-image-245" />     </p>
      
	<p>I am using CloudStorageAccount class to configure storage account settings, CloudBlobClient class to reference of 
	   Azure blob and CloudBlobContainer class to reference of Azure blob container.
	</p>
    <h2>C# Code to Get file stream of a Azure file share file</h2>
    <Pre>        
         public Stream GetFileStream(string connectionstring,string fileshare,string filename)
        {
            // Parse the connection string and return a reference to the storage account.
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionstring);
            // Create a CloudFileClient object for credential access to File storage.
            CloudFileClient fileClient = storageAccount.CreateCloudFileClient();
            // Get a reference to the file share.
            CloudFileShare share = fileClient.GetShareReference(fileshare);
            if (share.Exists())
            {
                // Get a reference to the root directory for the share.
                CloudFileDirectory rootDir = share.GetRootDirectoryReference();
                foreach (CloudFile file in rootDir.ListFilesAndDirectories())
                {
                    if (file.Name==filename)
                    {
                        Stream mem = new MemoryStream();
                        file.DownloadToStream(mem);
                        return mem;
                    }
                }
            }
            return null;
        }
    </Pre>
	<h2>Unzipping memory stream of a zip file</h2>
	<pre>
		public byte[] UnzipFileInMemory(Stream Zipmem)
        {
            byte[] buffer = new byte[16 * 1024];
            Zipmem.Position = 0;
            using (MemoryStream ms = new MemoryStream())
            {
                int read;
                while ((read = Zipmem.Read(buffer, 0, buffer.Length)) &gt; 0)
                {
                    ms.Write(buffer, 0, read);
                }

                using (var outputStream = new MemoryStream())
                using (var inputStream = new MemoryStream(ms.ToArray()))
                {
                    using (var zipInputStream = new ZipInputStream(inputStream))
                    {
                        zipInputStream.GetNextEntry();
                        zipInputStream.CopyTo(outputStream);
                    }
                    return outputStream.ToArray();
                }               
            }
        } 
	</pre>
	<h2>Load memory stream to Azure blob container</h2>
	<pre>
		public bool UploadByteArrayToBlob(byte[] memdata,string connectionstring ,string blobcontainer,string blobname)
        {
            CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionstring);
            CloudBlobClient blobClient = csa_storageAccount.CreateCloudBlobClient();
            CloudBlobContainer blobContainer = blobClient.GetContainerReference(blobcontainer);
            blobContainer.CreateIfNotExists();
            blobContainer.SetPermissions(new BlobContainerPermissions
            {
                PublicAccess = BlobContainerPublicAccessType.Blob
            });
            CloudBlockBlob blob = blobContainer.GetBlockBlobReference(blobname);
            blob.UploadFromByteArray(memdata, 0, memdata.Length);
            return true;
        } 
	</pre>
    <h2>Required Namespace to Create Blob Container</h2>
	<Pre>
		using Microsoft.Azure; // Namespace for Azure Configuration Manager
		using Microsoft.WindowsAzure.Storage; // Namespace for Storage Client Library
		using Microsoft.WindowsAzure.Storage.Blob; // Namespace for Blob storage
		using Microsoft.WindowsAzure.Storage.File; // Namespace for File storage
		using Microsoft.WindowsAzure.Storage.Auth;
	</Pre>
	
	<h2>Calling of method</h2>
	<pre>
		string strconnection = CloudConfigurationManager.GetSetting("StorageConnectionString");
        Console.WriteLine("Blob container ready to create ");
        Console.WriteLine(CreateBlobContainer(strconnection, "myblobcontainer"));
	</pre>
	
    <h2>Points of Interest</h2>

    <p>This article explain each step to unzip memory stream and load memory stream to Azure blob container</p>

    <h2>History</h2>

    <p>No updates available </p>]]></content:encoded>
    </item>
    <item>
      <title>Create Blob Container in Azure Storage</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/create-blob-container-in-azure-storage</link>
      <pubDate>Thu, 23 Jun 2016 03:07:15 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/?p=125</guid>
      <description><![CDATA[Introduction

    
        This article is used for creating blob container using c# code. It...]]></description>
      <content:encoded><![CDATA[<h2>Introduction</h2>

    <p>
        This article is used for creating blob container using c# code. It uses azure configuration manager , azure 
		storage and azure storage blob name space. I am reading storage credential from app.config
		
    </p>
<p>
<img src="https://msdnshared.blob.core.windows.net/media/2016/06/appconfig-300x70.jpg" alt="appconfig" width="500" height="200" class="alignnone size-medium wp-image-215" />
</p>
    	<p>we are using CloudStorageAccount class to configure storage account settings, CloudBlobClient class to reference of 
	   Azure blob and CloudBlobContainer class to reference of Azure blob container.
	</p>
    <h2>C# Code to Create Blob Container</h2>
    <Pre>
        //Create Blob if not exists
        public static string CreateBlobContainer(string connectionstring,string blobcontainername)
        {
            try
            {
                
                CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionstring);
                CloudBlobClient blobClient = storageAccount.CreateCloudBlobClient();
                CloudBlobContainer blobContainer = blobClient.GetContainerReference(blobcontainername);
                if (blobContainer.Exists())
                    return "Container already exists";
                blobContainer.CreateIfNotExists();
                blobContainer.SetPermissions(new BlobContainerPermissions
                {
                    PublicAccess = BlobContainerPublicAccessType.Blob
                });
                return "Container created";
            }
            catch(Exception ex)
            {
                return "Error !!!" + ex.Message;
            }
            
        }
    </Pre>
    <h2>Required Namespace to Create Blob Container</h2>
	<Pre>
		using Microsoft.Azure; // Namespace for Azure Configuration Manager
		using Microsoft.WindowsAzure.Storage; // Namespace for Storage Client Library
		using Microsoft.WindowsAzure.Storage.Blob; // Namespace for Blob storage
		using Microsoft.WindowsAzure.Storage.File; // Namespace for File storage
		using Microsoft.WindowsAzure.Storage.Auth;
	</Pre>
	
	<h2>Calling of method</h2>
	<pre>
		string strconnection = CloudConfigurationManager.GetSetting("StorageConnectionString");
        Console.WriteLine("Blob container ready to create ");
        Console.WriteLine(CreateBlobContainer(strconnection, "myblobcontainer"));
	</pre>
	
    <h2>Points of Interest</h2>

    <p>This article explain each step to create blob container using c#</p>

    <h2>History</h2>

    <p>No updates available </p>
]]></content:encoded>
    </item>
    <item>
      <title>Applying filter in Datazen report</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/applying-filter-in-datazen-report</link>
      <pubDate>Fri, 26 Jun 2015 21:22:14 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/06/26/applying-filter-in-datazen-report/</guid>
      <description><![CDATA[Introduction
Datazen provides controls to develop rich and interactive visualization reports....]]></description>
      <content:encoded><![CDATA[<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/mainreport.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/mainreport.jpg" border="0" alt=" " /></a></p>
<h2>Introduction</h2>
<p>Datazen provides controls to develop rich and interactive visualization reports. these reports are capable of rendering in any screen form factor. In my current article I will be explaining of filter capablities in Datazen report. I am assuming user has basic understanding of Datazen reports development. You can read datazen basics from my privious article <a href="/b/dbtechresource/archive/2015/04/26/business-intelligence-reporting-through-datazen.aspx">Business Intelligence Reporting through Datazen</a></p>
<h2>Background</h2>
<p>I am using AdventureworksDW2012 database to explain filtering capabilites. In this report user will have selection list to choose countries name. report will display reseller sales and internet sales of selected counries. I am assuming user already has datazen enterprize server is configured in thier environment. I have already prepared datasource for <b>adventureworksDW2012</b> database in my Datazen enterprise server. I have placed all required Datazen view for this report in <b>adventureworksDW2012</b> datasource</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AdventureDatasource.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AdventureDatasource.JPG" border="0" alt=" " /></a></p>
<h2>Create Datazen views for report</h2>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Allviews.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Allviews.JPG" border="0" alt=" " /></a></p>
<p><b>Sales Territory dimension</b></p>
<pre>    Select SalesTerritoryKey,SalesTerritoryRegion,SalesTerritoryCountry from DimSalesTerritory
    </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SalesTerritory.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SalesTerritory.JPG" border="0" alt=" " /></a></p>
<p><b>Geography dimension</b></p>
<pre>    Select GeographyKey,SalesTerritoryKey,EnglishCountryRegionName,City,PostalCode from [dbo].[DimGeography]
    </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Geography.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Geography.JPG" border="0" alt=" " /></a></p>
<p><b>Reseller sales</b></p>
<pre>    Select ST.SalesTerritoryRegion,ST.SalesTerritoryCountry,
    RS.OrderDate,RS.SalesAmount,RS.TaxAmt from FactResellerSales RS
    Left Join DimSalesTerritory ST ON RS.SalesTerritoryKey=ST.SalesTerritoryKey
    </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/6278.ResellerSales.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/6278.ResellerSales.JPG" border="0" alt=" " /></a></p>
<p><b>Internet sales</b></p>
<pre>    Select ST.SalesTerritoryRegion,ST.SalesTerritoryCountry,
    FS.OrderDate,FS.SalesAmount,FS.TaxAmt from FactInternetSales FS
    Left Join DimSalesTerritory ST ON FS.SalesTerritoryKey=ST.SalesTerritoryKey
    </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/1731.Internetsales.JPG"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/1731.Internetsales.JPG" border="0" alt=" " /></a></p>
<h2>Create Datazen report with filter feature</h2>
<ul>
<ul>
<li>Create new datazen report</li>
<li>Switch to Data View</li>
<li>Click on Add Data</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AddData.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AddData.jpg" border="0" alt=" " /></a></p>
<ul>
<ul>
<li>Select Datazen Server option for data sources</li>
<li>Select Datazen server for development</li>
<li>Select Dashboard hub where all Datazen views are configured</li>
<li>Select Datasource name</li>
<li>Select all required views and click on Import button</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/datazenviews.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/datazenviews.jpg" border="0" alt=" " /></a></p>
<ul>
<ul>
<li>Now switch to Layout View to design report</li>
<li>Drag <b>Selection List</b> from Navigator control</li>
<li>Configure <b>Visual properties</b> of this control</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AddSelection.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AddSelection.jpg" border="0" alt=" " /></a></p>
<ul>
<ul>
<li>Assign data set to these Navigator controls</li>
<li>Apply data filter on <b>Internet Sales</b> and <b>Reseller Sales</b> with sales territory region</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Datafilter.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Datafilter.jpg" border="0" alt=" " /></a></p>
<ul>
<ul>
<li>Drag two <b>Simple data grid</b> to display reseller sales and internet sales amount of selected sales territory region</li>
<li>Provide all required <b>Visual properties</b></li>
<li>Mark option <b>Aggregate by a field</b> to ON for both grid</li>
<li>Set Data properties for both grid</li>
<li>Assign corresponding data set for corresponding grid. I have used reseller sales and internet sales as dataset for both the grid</li>
<li>Click on <b>Option</b> button and switch check mark to on for <b>Filtered by</b> section. I did check mark on for <b>Sales nterritory region</b></li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/filteron.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/filteron.jpg" border="0" alt=" " /></a></p>
<ul>
<ul>
<li>Select required <b>Columns</b> for data grid</li>
<li>Apply aggregation on required field. I did it for <b>Sales Amount</b> and <b> Tax Amount</b></li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/applyaggregate.jpg"><img src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/applyaggregate.jpg" border="0" alt=" " /></a></p>
<ul>
<li>Now we have enough controls in report to test filter capability. But to extend this feature in other control , I have also dragged Bubble map and Pie chart</li>
<li>Bubble map will display reseller sales amount of selected Sales territory on <b>World map</b></li>
<li>Pie chart will display percentage value of total reseller sales amount and total internet sales amount for selected sales territory region</li>
<li>Apply <b>Filtered</b> feature in both of these controls.</li>
<li>Save and execute report</li>
</ul>
<h2>Points of Interest</h2>
<p>While execution of this report, user will require to select sales territory region from selection list. I have allowed to select multiple sales territory region. Report will display total reseller sales amount and total internet sales amount for selected sales territory region in data grid as well as sales percentage in pie chart. This article explains filter feature usability in different control of datazen.</p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
    <item>
      <title>Business Intelligence Reporting through Datazen</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/business-intelligence-reporting-through-datazen</link>
      <pubDate>Sun, 26 Apr 2015 01:52:34 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/26/business-intelligence-reporting-through-datazen/</guid>
      <description><![CDATA[Introduction
Datazen Software &ndash; industry leader in mobile business intelligence and data...]]></description>
      <content:encoded><![CDATA[<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MainSample.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MainSample.jpg" border="0" /></a></p>
<h2>Introduction</h2>
<p>Datazen Software &ndash; industry leader in mobile business intelligence and data analytics &ndash; was acquired by Microsoft in April of 2015. The acquisition accelerates Microsoft&#039;s strategy to help every company create a data culture and ensure insights reach every individual in every organization. Datazen&rsquo;s product team has joined Microsoft as a part of this acquisition and continues to develop and evolve this technology. Datazen Windows 8 app enables dashboard creation and publishing based on Excel, cloud and enterprise data sources. After publishing to a Datazen Server, dashboards and KPIs are accessible on any device via its native app, or through any major browser.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DatazenWorkflow.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DatazenWorkflow.jpg" border="0" /></a></p>
<h2>Background</h2>
<p>Datazen publisher creates stunning BI dashboards from Excel, SQL Server, SSAS, SQL Azure, SharePoint and other cloud &amp; enterprise data sources. Datazen works on both Data-first and design-first principle. The product can be used in two modes:</p>
<ul>
<li>Standalone App: Users can create dashboards from local Excel documents, save them on their device and share via email.</li>
<li>Connected to a Datazen Server: Users can access cloud and enterprise data sources and publish dashboards for access by other people in their organization.</li>
</ul>
<h2>Features</h2>
<ul>
<li>Touch-based dashboard designer</li>
<li>Complete dashboard publishing system</li>
<li>Excel, SQL Server and SharePoint data source support</li>
<li>Client-side data caching for offline access</li>
<li>Ability to create phone, tablet and workstation dashboard layouts</li>
</ul>
<h2>Installation of Datazen Publisher</h2>
<ul>
<ul>
<li>Search Datazen publisher in Windows Store.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Searchdatazen.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Searchdatazen.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Click on install</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ClickInstall.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ClickInstall.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Installation of Datazen publisher is very simple. Once it is installed in system, open it.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/OpenDatazen.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/OpenDatazen.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Once it get started, it will connect with demo Datazen enterprise server.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Connecttoserver.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Connecttoserver.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Demo server contains several existing KPI and report dashboard.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Dashboardappear.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Dashboardappear.jpg" border="0" /></a></p>
<h2>Create dashboard report using Datazen publisher</h2>
<p>Standalone App: Standalone apps are published through local excel file. Dashboard is prepared based on available data in excel file.</p>
<h3>Mapping of development folder in Datazen Publisher</h3>
<ul>
<ul>
<li>Right click on application. It will appear below screen.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Dashboardinitial.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Dashboardinitial.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Click on manage icon available at bottom right.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Workingfolder.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Workingfolder.jpg" border="0" /></a></p>
<ul>
<li>Select Working Folder from left navigation and click on Change Now button.</li>
<li>Select required working folder where Datazen system will keep required excel data file.</li>
</ul>
<h3>Create Datazen reports</h3>
<ul>
<ul>
<li>Right click on Datazen publisher application and further click on Create button from application task bar.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/CreateReport.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/CreateReport.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Click on Start from an empty dashboard</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/StartEmptyDashboard.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/StartEmptyDashboard.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Blank dashboard will be appear on screen.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/BlankDashboard.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/BlankDashboard.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Specify dashboard name using Dashboard Settings button.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SpecifyDashboard.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SpecifyDashboard.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Given file name will be save in working folder with extension .Datazen</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SaveDatazen.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SaveDatazen.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Move to layout view to design sample sales report in Datazen</li>
<li>Select required template from left pane and drag it to designer section. Resize it as per your requirement. I have selected Category chart template.</li>
<li>Specify title of report using Visual properties box available at the bottom.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/VisualProperty.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/VisualProperty.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Prepare dataset in excel file. I have used adventureworksDW2012 database for my dataset. I have given ProductSales as excel file name and Product category as worksheet name.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Adventuredata.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Adventuredata.jpg" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Adventureexcel.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Adventureexcel.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Now we will map Datazen reports to our dataset Product Category.</li>
<li>Click on Data view icon in Datazen designer.</li>
<li>Click on Add Data button and select Local Excel option.</li>
<li>Specify path of ProductSales.xlsx file and check worksheet name Product category. Please follow this instruction in defining data set from excel file.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExcelInstructions.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExcelInstructions.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Now excel dataset is available for Datazen report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExcelDataset.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExcelDataset.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Specify Category coordinates in Data properties box available at bottom.</li>
<li>Now report creation is done. Click on Run Preview to see the actual report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportPreview.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportPreview.jpg" border="0" /></a></p>
<ul>
<ul>
<li>You can change report formatting and color by selecting color palate available at right corner of Layout view. I have selected silver color palate for this sample report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Colorpalate.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Colorpalate.jpg" border="0" /></a></p>
<ul>
<ul>
<li>You can also adjust Grid rows and Grid columns in layout view using available slider control for each part. I have set 4 in grid rows and 6 in grid columns.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AdjustGrid.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/AdjustGrid.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Click on run preview to display report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/RunPreview.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/RunPreview.jpg" border="0" /></a></p>
<h3>Create Datazen reports for mobile and tablet devices</h3>
<ul>
<ul>
<li>Click on layout view and select devices category from device dropdown.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DeviceLayout.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DeviceLayout.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Select Tablet or Phone option to design Datazen report for these portable devices. I have selected Phone.</li>
<li>Drag available control instances in designer grid panel.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DragControl.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DragControl.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Manage size of control into designer as per requirement.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ManageSize.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ManageSize.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Click on Run preview to display report in mobile layout.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/PhonePreview.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/PhonePreview.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Apply same process for tablet and preview report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/TabletPreview.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/TabletPreview.jpg" border="0" /></a></p>
<ul>
<li>Now same report is available for Laptop, Mobile and Tablet.</li>
</ul>
<h2>Manage reports using Datazen publisher options</h2>
<p>Right click on report. Task bar will appear at the bottom of Datazen publisher. It allows to do below operation.</p>
<ul>
<ul>
<li>Home: Move directly to dashboard area where all reports are available.</li>
<li>Create from: it allows to create duplicate copy of same Datazen report.</li>
<li>Delete: it allows to delete current Datazen report.</li>
<li>Edit: it allows to modify existing report.</li>
<li>Refresh: it refresh report dataset.</li>
<li>Create: it allows to create new dashboard report.</li>
<li>Manage: it allows to manage Datazen dashboard settings.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ManageReport.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ManageReport.jpg" border="0" /></a></p>
<h2>Create drill through reports using Datazen publisher</h2>
<ul>
<ul>
<li>Open Datazen report in Edit mode.</li>
<li>Click on Drill through target button in visual properties box available at bottom of designer.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Drillthrough.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Drillthrough.jpg" border="0" /></a></p>
<ul>
<ul>
<li>It will ask for 2 options to implement drill through report.</li>
</ul>
<ul>
<li>Dashboard: it is used to call another Datazen reports from parent report.</li>
<li>Custom URL: it is used to call any external reports published on some URL.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DrillthroughOptions.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/DrillthroughOptions.jpg" border="0" /></a></p>
<ul>
<ul>
<li>I have implemented Custom URL option to implement drill through report. It will open URL expression box to accept URL.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SetURLParameter.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SetURLParameter.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Pass URL expression along with available parameters and click on apply. I have passed SSRS report URL accepting parameter Data point.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ApplyURLExpression.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ApplyURLExpression.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Now Save the report and execute it from Dashboard. Click on Drill through area. It will open SSRS drill report on right pane.</li>
</ul>
</ul>
<p>Note: Drill through feature does not work from design preview.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ShowDrillthrough.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ShowDrillthrough.jpg" border="0" /></a></p>
<h2>Publish Datazen reports on Datazen enterprise server</h2>
<ul>
<ul>
<li>Open required report in design mode and right click on report area.</li>
<li>Click on Publish to Server button available at bottom of report.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Publishtoserver.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Publishtoserver.jpg" border="0" /></a></p>
<ul>
<ul>
<li>Specify server name from server name dropdown list and click on publish.</li>
</ul>
</ul>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SpecifyServer.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SpecifyServer.jpg" border="0" /></a></p>
<ul>
<li>Report will be publish on server.</li>
<li>Finish</li>
</ul>
<h2>Points of Interest</h2>
<p>This article explain each step to implement Datazen report and deployment of it on Datazen enterprise server.</p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
    <item>
      <title>Read OLAP cube and display in simple SSRS report</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/read-olap-cube-and-display-in-simple-ssrs-report</link>
      <pubDate>Sat, 04 Apr 2015 07:42:20 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/04/read-olap-cube-and-display-in-simple-ssrs-report/</guid>
      <description><![CDATA[Introduction
This article is for beginner who wants to read data from SSAS cube. Numbers are...]]></description>
      <content:encoded><![CDATA[<p></p>
<h2>Introduction</h2>
<p>This article is for beginner who wants to read data from SSAS cube. Numbers are available in Cube under Dimension and Measure Group. MDX (multi dimension expression) query is used to read data from SSAS cube. this article will show, how cube data can be display through SSRS report.</p>
<h2>Background</h2>
<p>Data warehouse contains several fact and dimension table. these table contains huge record set. accessing facts/measures from these table in small relational database is easy. it can be done using T-SQL query. But when dataset is very large , it becomes complex to display in SSRS report. SSRS reports takes many hour to display such report. So that these heavy data set are implemented in SSAS cube.MDX query is used to read data from cube. MDX query gets record set very quickly. hence large report takes very small time to display in SSRS report.</p>
<h2>Using the code</h2>
<p>To Use this article one must have available cube in SQL Server Analysis Service Engine. Below images shows how cube should available in analysis service.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SSASEngine.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SSASEngine.jpg" border="0" /></a></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SSASCube.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/SSASCube.jpg" border="0" /></a></p>
<p>In simple SSRS report with MDX query , we are reading data from Adventure Works Cube. Below MDX query will used in simple SSRS report to get Internet sales data.</p>
<pre>SELECT NON EMPTY 
{ 
[Measures].[Internet Freight Cost], 
[Measures].[Internet Sales Amount], 
[Measures].[Internet Average Sales Amount], 
[Measures].[Internet Average Unit Price]
} ON COLUMNS FROM [Adventure Works]</pre>
<p>Below images describe step by step process to show MDX result in SSRS report.</p>
<p>1. Create New report server project</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportProject.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportProject.jpg" border="0" /></a></p>
<p>2. Create New data source points to SQL Server analysis service database</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/CubeDataSource.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/CubeDataSource.jpg" border="0" /></a></p>
<p>3. Create New Data set for Internet sales report using MDX query</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/InternetSalesDataSet.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/InternetSalesDataSet.jpg" border="0" /></a></p>
<p>3. Create New report file to display MDX result</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/InternetSalesReport.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/InternetSalesReport.jpg" border="0" /></a></p>
<p>4. Design table and assign required column in SSRS report</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportSample.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ReportSample.jpg" border="0" /></a></p>
<h2>Points of Interest</h2>
<p>This is very simple project to learn reading of Cube data through MDX and display in SSRS report.</p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
    <item>
      <title>OLAP cube reading through MDX :part 2</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/olap-cube-reading-through-mdx-part-2</link>
      <pubDate>Sat, 04 Apr 2015 07:39:44 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/04/olap-cube-reading-through-mdx-part-2/</guid>
      <description><![CDATA[Introduction
This article contains calculation process used in MDX. I have already covered basic...]]></description>
      <content:encoded><![CDATA[<p></p>
<h2>Introduction</h2>
<p>This article contains calculation process used in MDX. I have already covered basic MDX query, Filter process in MDX query and different Slicing feature in MDX query in my previous article <a href="/b/dbtechresource/archive/2015/04/04/olap-cube-reading-through-mdx-part-1.aspx">OLAP cube reading through MDX : part 1</a>. Calculation process in MDX includes artihmetical and logical values process with existing measures values,specify range based calculation with measure value and date wise calculation with measure value.</p>
<h2>Background</h2>
<p>OLAP cube contains multiple different mesaures. these measures can be query through different available dimension. dimensions available in OLAP cube are collection of attributes.OLAP cube contains definition of attribute relationship of dimension. This article will cover calculation based on attribute relationship available in dimension. if you require <b>basic of MDX query</b>, Please do read my article <a href="/b/dbtechresource/archive/2015/04/04/olap-cube-reading-through-mdx-part-1.aspx">OLAP cube reading through MDX : part 1</a>. I personally assume, strength in MDX query makes you more comfortable to work on OLAP cube. more different way , you will write MDX query more comfort you will be on OLAP cube. writing complex OLAP cube helps you to prepare business solution easily.</p>
<h2>Calculation in MDX query</h2>
<p>After writing basic MDX query and familiar with syntax of MDX we can start for complex MDX query. till now we have used existing measures and dimension of OLAP cube in MDX query. we may require some time calculated measure or calculated dimension for our business process. this can be achive through <b>With Member</b> clause in MDX</p>
<p><b>With Member clause allow to create scope member in MDX</b></p>
<pre>With member [Measures].[My Member] as &quot;Datawarehouse Consultant&quot;
Select 
{
[measures].[My Member] 
} ON Columns
From [Adventure works]
</pre>
<p>above MDX query will create scope member <b>[My Member]</b> in current scope.</p>
<p><b>Create alias of existing member using With Member</b></p>
<pre>With 
Member [measures].[customer sales] as [measures].[internet sales amount]
Member [measures].[retailer sales] as [measures].[reseller sales amount]
Select 
{
[measures].[customer sales],
[measures].[retailer sales]
} on columns,
{
[date].[calendar].[calendar year]
} on rows
from [adventure works]
</pre>
<p>above query creates alias [Customer Sales] and [Retailer Sales] for existing member. This steps actually help when required member is available in multiple level of measure group.Alias helps to access this long name with some small name.</p>
<p><b>Calculation using With Member</b></p>
<pre>With 
Member [measures].[customer sales] as [measures].[internet sales amount]
Member [measures].[retailer sales] as [measures].[reseller sales amount]
Member [measures].[Total Sales] as [measures].[internet sales amount]+ [measures].[reseller sales amount]
Select 
{
[measures].[customer sales],
[measures].[retailer sales],
[measures].[total sales]
} on columns,
{
[date].[calendar].[calendar year]
} on rows
from [adventure works]
</pre>
<p>In above MDX query example, [Total sales] is a new member calculated using <b>With Member</b> clause.</p>
<p><b>Formatting of existing member using With Member</b></p>
<pre>With 
Member [measures].[customer sales] as [measures].[internet sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [measures].[retailer sales] as [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [measures].[Total Sales] as [measures].[internet sales amount]+ [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
Select 
{
[measures].[customer sales],
[measures].[retailer sales],
[measures].[total sales]
} on columns,
{
[date].[calendar].[calendar year]
} on rows
from [adventure works]
</pre>
<p>In above example,all sales figure will display in <b>&euro;</b> format.</p>
<p><b>Named set create using With Set clause</b></p>
<p>long MDX expression can alias with Set name using <b>With Set</b> clause.</p>
<pre>With 
Set [Not 2008] as [Date].[Calendar].[Calendar Year].[CY 2001] : [Date].[Calendar].[Calendar Year].[CY 2007]
Member [measures].[customer sales] as [measures].[internet sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [measures].[retailer sales] as [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [measures].[Total Sales] as [measures].[internet sales amount]+ [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
Select 
{
[measures].[customer sales],
[measures].[retailer sales],
[measures].[total sales]
} on columns,
{
[Not 2008]
} on rows
from [adventure works]
</pre>
<p>In above example, I have create <b>[Not 2008]</b> as named set. this named set contains all clendar year from [CY 2001] to [CY 2007]</p>
<p><b>Create Member in MDX to create member or set for entire session</b></p>
<pre>Create 
Member [adventure works].[measures].[customer sales] as [measures].[internet sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [adventure works].[measures].[retailer sales] as [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
Member [adventure works].[measures].[Total Sales] as [measures].[internet sales amount]+ [measures].[reseller sales amount],format_string=&quot;#,###.00&euro;&quot;
</pre>
<p>In above example, I have created three member for entire session. now we can use these member in entire session. Note: we must require to provide cube name before specifiying member name in Create Member.</p>
<pre>Select 
{
[measures].[customer sales],
[measures].[retailer sales],
[measures].[total sales]
} on columns,
{
[Date].[Calendar].[Calendar Year]
} on rows
from [adventure works]
</pre>
<p>In above example, I have consumed all new member created in previous exaple through <b>Create Member</b> clause.</p>
<p><b>Drop member created using Create Member</b></p>
<pre>drop member [adventure works].[measures].[customer sales]
go
drop member [adventure works].[measures].[retailer sales]
go
drop member [adventure works].[measures].[Total Sales]
</pre>
<p>In above example, I have dropped all member created using Create Member clause.</p>
<p><b>Working with time dimension in MDX query</b></p>
<pre>Select
{
[Date].[Fiscal].[Fiscal Year].[FY 2007]
} ON Columns
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above query will display Sales figure of financial year 2007.</p>
<p><b>Previous and Next member access in MDX</b></p>
<pre>Select
{
[Date].[Fiscal].[Fiscal Year].[FY 2007].Prevmember,
[Date].[Fiscal].[Fiscal Year].[FY 2007],
[Date].[Fiscal].[Fiscal Year].[FY 2007].Nextmember
} ON Columns
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above example is using <b>PrevMember</b> and <b>NextMember</b> property to access previous and next member of any dimension.</p>
<p><b>ParallelPeriod function in MDX also returns prev/next member based on given parameter.</b></p>
<pre>Select
{
ParallelPeriod([Date].[Fiscal].[Fiscal Year],1,[Date].[Fiscal].[Fiscal Year].[FY 2007])
} ON Columns
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above example return previuos year member of [FY 2007]. because parameter value given to <b>ParallelPeriod</b> function is 1.</p>
<p><b>OpeningPeriod function and ClosingPeriod function.</b></p>
<pre>Select
{
OpeningPeriod([Date].[Fiscal].[Fiscal Year]),
ClosingPeriod([Date].[Fiscal].[Fiscal Year])
} ON Columns
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p><b>Openingperiod</b> function returns first member of given dimension and <b>Closingperiod</b> function returns last member of given dimension.</p>
<p><b>Specify range in member using : (colon) operator</b></p>
<pre>Select
{
OpeningPeriod([Date].[Fiscal].[Fiscal Year]):
ClosingPeriod([Date].[Fiscal].[Fiscal Year])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above example is using : operator to specify begining member to end member of dimension.I have used Openingperiod function for first member and Closingperiod function for last member.</p>
<p><b>Starting Range in MDX can be specify using NULL value</b></p>
<pre>Select
{
NULL:
ClosingPeriod([Date].[Fiscal].[Fiscal Year])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>in above example, initial range is specified using value NULL.</p>
<p><b>PeriodsToDate function to specify range in member</b></p>
<pre>--display financial year wise sales
Select
{
PeriodsToDate([Date].[Fiscal].[(All)],[Date].[Fiscal].[Fiscal Year].[FY 2008])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
--display month wise sales of given financial year
Select
{
PeriodsToDate([Date].[Fiscal].[Fiscal Year],[Date].[Fiscal].[Month].[DECEMBER 2006])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>in first example, PeriodtoDate function display sales value from first available financial year to financial year 2008. while in second example when we have provided financial month in range, it will show sales of first financial month of year upto given financial month of year.</p>
<p><b>Specify range in MDX using LastPeriod function</b></p>
<pre>--display previous 3 member
Select
{
LastPeriods(3,[Date].[Fiscal].[Fiscal Year].[FY 2008])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
--display next 3 member
Select
{
LastPeriods(-3,[Date].[Fiscal].[Fiscal Year].[FY 2008])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above example display that positive value in <b>LastPeriods</b> function shows last member and negative parameter value in <b>LastPeriods</b> function shows next member in given dimension.</p>
<p><b>Specify date range in dimension using YTD,QTD and MTD function.</b> YTD covers Year till date members of dimension, QTD covers Quarter till date members and MTD covers Month till date members of given dimension.</p>
<pre>--YTD for Year till date
Select
{
YTD([Date].[Calendar].[Calendar Year].[CY 2008])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
--QTD for quarter till date
Select
{
QTD([Date].[Calendar].[Month].[DECEMBER 2006])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
--MTD for month till date
Select
{
MTD([Date].[Calendar].[Date].[July 2,2006])
} ON Columns,
{
[Product].[Category].[Category]
}ON rows
From [Adventure Works]
Where [Measures].[Internet Sales Amount]
</pre>
<p>above example display date range specification using YTD,QTD and MTD function.</p>
<h2>Points of Interest</h2>
<p>This article is very interesting in learning of MDX query. once basic of MDX is known, this article will help you to extend your knowledge in calculation using MDX. my next article will cover MDX advance calculation process,decision making in MDX and KPI defining using MDX.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MDXPart2.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MDXPart2.jpg" border="0" /></a></p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
    <item>
      <title>OLAP cube reading through MDX : part 1</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/olap-cube-reading-through-mdx-part-1</link>
      <pubDate>Sat, 04 Apr 2015 07:38:55 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/04/olap-cube-reading-through-mdx-part-1/</guid>
      <description><![CDATA[Introduction
This article explain learning of MDX query in detail. when OLAP cube is designed and...]]></description>
      <content:encoded><![CDATA[<p></p>
<h2>Introduction</h2>
<p>This article explain learning of MDX query in detail. when OLAP cube is designed and deployed on SSAS engine , we use MDX to read data. OLAP cube contains data in Cube database. this cube database is different from OLTP relational database. Cube database contains Datasources, Datasource views,Cubes,dimension and minining structure. Each cube in cube list contains <b>Measure Groups</b>. these measure groups consist of different measures on which multiple dimension can be apply. I am assuming you have already available of OLAP cube in SSAS engine. if it is not available then first download it from <b>codeplex</b> and deploy the cube. I have already cover OLAP Cube deployment steps in my previous article <a href="/b/dbtechresource/archive/2015/04/04/step-by-step-ssas-cube-designing.aspx">step by step SSAS cube designing</a>.</p>
<h2>Background</h2>
<p>OLTP database can be query using T-SQL. T-SQL uses select statement to read data from table. similarly OLAP cube reads data from measures and dimension using MDX query. MDX has separate syntax to specify multiple dimension and measures in query. this article covers these syntax and function in details. MDX allows to specify multiple dimension in single query and can generate result dataset. MDX is managed query expression which covers different approach to apply dimension on any measures.</p>
<h2>Using the code</h2>
<p>Connet with SSAS service engine.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/2134.SSASEngine.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/2134.SSASEngine.jpg" border="0" /></a></p>
<p>Open database and click on <b>New Query</b>. MDXquery1.mdx file will be available to write MDX query.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Newquery.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Newquery.jpg" border="0" /></a></p>
<p>Expand cube to view all available measure and dimension</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExpandCube.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ExpandCube.jpg" border="0" /></a></p>
<p><b>Start writing first MDX query</b></p>
<pre>SELECT FROM 
[ADVENTURE WORKS]
</pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/FirstResult.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/FirstResult.jpg" border="0" /></a></p>
<p>above query contains Select statement reading data from OLAP cube <b>[Adventure works]</b>. result value is showing <b>$80,450,596.98</b> value. it is default assign measure value read by MDX. you can verify it by checking below SQL query.</p>
<pre>SELECT SUM(S.SalesAmount) FROM FactResellerSales S
</pre>
<p>Now it clearly display that deafult measure is <b>ResellerSales</b>.</p>
<p><b>FactResellerSales</b> table is available in <b>AdventureWorksDW2008R2</b> database. this database can be download from codeplex site.</p>
<p><b>MDX query to read from specific measures</b></p>
<pre>SELECT FROM [ADVENTURE WORKS] 
WHERE [MEASURES].[RESELLER SALES AMOUNT]
</pre>
<p>above MDX query will read cube data from <b>[RESELLER SALES AMOUNT]</b> measure.</p>
<p>where clause specify measure/dimeansion area of cube to which Set is to be slice.</p>
<p><b>Slice Dice and Filter in MDX query</b></p>
<p><b>specify measure value in column</b></p>
<pre>SELECT 
[MEASURES].[RESELLER FREIGHT COST] ON COLUMNS
FROM [ADVENTURE WORKS]
</pre>
<p>above query will show measure [RESELLER FREIGHT COST] data into column.</p>
<p><b>specify measure in where clause and dimension in column</b></p>
<pre>--SPECIFYING MEASURES IN WHERE CLAUSE

--WHERE CLAUSE TO GET PRODUCT WISE SALE OF SPECIFIC MEASURE
Select 
{
[product].[product categories].[category],
[product].[product categories]
} on columns
from [adventure works]
where 
[measures].[reseller tax amount]
</pre>
<p>above query will get product dimension wise reseller tax measure data.</p>
<p><b>specify non measure member in where clause</b></p>
<pre>Select 
{
[product].[product categories].[category],
[product].[product categories]
} on columns
from [adventure works]
where [geography].[geography].[country].[canada]
</pre>
<p>above query will get product wise reseller sales for specific country Canada. <b>[geography].[geography].[country].[canada]</b> is dimension and not a measure specified in where clause. so that where clause accepts dimension as well as measures</p>
<p><b>specify multiple member in where Slicer</b>.</p>
<pre> Select 
{
[product].[product categories].[category],
[product].[product categories]
} on columns
from [adventure works]
where 
(
[geography].[geography].[country].[canada],
[measures].[internet sales amount]
)
 </pre>
<p>above MDX query has multiple member in where Slicer. it reads internet sales of specific country Canada.</p>
<p><b>two non measure dimension in same slicer</b></p>
<pre>Select 
{
[product].[product categories].[category],
[product].[product categories]
} on columns
from [adventure works]
where 
(
{
[customer].[customer geography].[country].[canada],
[customer].[customer geography].[country].[australia]
},
[measures].[internet sales amount]
)
</pre>
<p>above MDX query specified two non measure in slicer. it display internet sales amount of two country Canada and Australia.</p>
<p><b>Except and Minus</b> operation in MDX</p>
<pre>Select 
{
[product].[product categories].[category],
[product].[product categories]
}
on columns
from [adventure works]
where
(
{
[Sales Territory].[Sales Territory].[country]
-
[Sales Territory].[Sales Territory].[country].[United Kingdom]
},
[measures].[internet sales amount]
)
</pre>
<p>you can also use below query for except operation</p>
<pre>Select 
{
[product].[product categories].[category],
[product].[product categories]
}
on columns
from [adventure works]
where
(
[measures].[internet sales amount],
{
Except(
[Sales Territory].[Sales Territory].[country],
[Sales Territory].[Sales Territory].[country].[United Kingdom]
)
}
)
</pre>
<p>above query uses <b>Except</b> and <b>-</b> operator to slice from query. it will show internet sales amount of all sales territory except United Kingdom</p>
<p><b>Show dimension in rows and measures in column in MDX query</b></p>
<pre>Select
{
[measures].[internet sales amount]
} on columns,
{
[product].[product categories].[category]
} on rows
from 
[adventure works]
</pre>
<p>above query will display product wise internet sales amount. product category will be available in rows and internet sales will be available in columns.</p>
<p><b>Filter</b> in MDX query is apply through Filter function</p>
<pre>--apply filter using filter function
Select
{
[measures].[internet sales amount]
} on columns,
{
filter([product].[product categories].[category],
[measures].[internet sales amount] &gt;0)
} on rows
from 
[adventure works]
</pre>
<p>above query will display product wise internet sales amount having sales amount greater than 0.</p>
<p><b>Row level filter can be apply using Having clause in MDX</b></p>
<pre>Select
{
[measures].[internet sales amount]
} on columns,
{
[product].[product categories].[category]
}
having [measures].[internet sales amount] &gt; 0
on rows
from 
[adventure works]
</pre>
<p><b>Boolean operator used in MDX query to apply row level filter</b></p>
<pre>Select
{
[measures].[internet sales amount]
} on columns,
{
filter([product].[product categories].[category],
[measures].[internet sales amount] &gt;500000 AND [measures].[internet sales amount] &lt;750000)
} on rows
from 
[adventure works]
</pre>
<p>above query will show internet sales of all product which has sales amount greater than 500000 and less than 750000. condition is applied using <b>And</b> operator in Filter function.</p>
<p><b>Comparing between two measures value in MDX</b></p>
<pre>Select
{
[measures].[internet sales amount]
} on columns,
{
filter([product].[product categories].[category],
[measures].[internet sales amount] &gt; [measures].[reseller sales amount])
} on rows
from 
[adventure works]
</pre>
<p>above query will compare two measures and show all rows where measure value of internet sales is greater than reseller sales.</p>
<p><b>Using of IS operator in MDX query</b></p>
<pre>Select
{
[measures].[internet sales amount],
[measures].[reseller sales amount]
} on columns,
{
filter([product].[product categories].[category],
([product].[product categories].CURRENTMEMBER IS 
[product].[product categories].[category].[accessories]) 
OR
([product].[product categories].CURRENTMEMBER IS 
[product].[product categories].[category].[Bikes])
)
} on rows
from 
[adventure works]

</pre>
<p>above query will display sales detail of product category Bikes and Accessories only.condition in MDX is specified using <b>IS</b> operator.</p>
<p><b>Non Empty to slice NULL rows from MDX result set.</b></p>
<pre>Select
{
[measures].[internet sales amount],
[measures].[reseller sales amount]
} on columns,
non empty filter([product].[product categories].[category],
[measures].[internet sales amount] &gt;0
)
on rows
from [adventure works]
</pre>
<p><b>Tops and Bottoms row accessing using MDX</b></p>
<p>Show internet sales amount of all product subcategory</p>
<pre>Select
[measures].[internet sales amount] on columns,
[product].[product categories].[subcategory] on rows
from [adventure works]
</pre>
<p>Show top 5 rows of product subcategory</p>
<pre>Select
[measures].[internet sales amount] on columns,
topcount([product].[product categories].[subcategory],5) on rows
from [adventure works]

</pre>
<p>Show internet sales of top 5 product subcategories using <b>Topcount</b> in MDX.</p>
<pre>Select
[measures].[internet sales amount] on columns,
topcount([product].[product categories].[subcategory],5,[measures].[internet sales amount]) on rows
from [adventure works]

</pre>
<p>Show internet sales of bottom 10 product subcategories excluding NULL or 0 values using <b>Bottomcount</b> in MDX.</p>
<pre>Select
{[measures].[internet sales amount] ,
[measures].[reseller sales amount]}
on columns,
bottomcount(
filter([product].[product categories].[subcategory],[measures].[internet sales amount]&gt;0)
,10,
[measures].[internet sales amount]) on rows
from [adventure works]
</pre>
<p><b>Topsum</b> in MDX query to show all top rows actually formed sum of given value.</p>
<pre>Select
[measures].[internet sales amount] on columns,
topsum([product].[product categories].[subcategory],25000000,[measures].[internet sales amount]) on rows
from [adventure works]

</pre>
<p>above query shows all product subcategories internet sales which is forming sum of 25000000 amount.</p>
<p><b>Bottomsum</b> in MDX query to show least rows require to form sum of specific value.</p>
<pre>Select
[measures].[internet sales amount] on columns,
bottomsum([product].[product categories].[subcategory],1000000,[measures].[internet sales amount]) on rows
from [adventure works]

</pre>
<p>above query shows all product subcategories internet sales which is forming sum of 1000000 amount.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MDXPart1.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/MDXPart1.jpg" border="0" /></a></p>
<h2>Points of Interest</h2>
<p>This article is very interesting in learning of MDX query. it explain different feature available in MDX query to read data from OLAP Cube. This is first part article for MDX query. next part article will cover calculation in MDX query.</p>
<h2>History</h2>
<p>No updates available</p>
<!---    That's it!   -->]]></content:encoded>
    </item>
    <item>
      <title>Learning DOS batch shell script</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/learning-dos-batch-shell-script</link>
      <pubDate>Sat, 04 Apr 2015 07:38:20 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/04/learning-dos-batch-shell-script/</guid>
      <description><![CDATA[Introduction
Professionally I am Database and BI consultant. mostly I work on SQL Server and BI...]]></description>
      <content:encoded><![CDATA[<p></p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ProgrammingDOSShell.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/ProgrammingDOSShell.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/ProgrammingDOSShell.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/ProgrammingDOSShell.jpg" border="0" /></a></p>
<h2>Introduction</h2>
<p>Professionally I am Database and BI consultant. mostly I work on SQL Server and BI related technology. but traditionally I assume myself as a programmer.I used different scripting language to solve specific problem many times in my work profile. No matter what BI platform you are using, sometime you require to develop such script to make your job easy. it could be for cleansing dirty files, managing file system related task,handling any executable utility through command line,automation of any process etc. All these require script writing skill. This article is based on learning programming skills for DOS batch script. although DOS is no where is used but its scripting and commands are powerful too.I will be explaining different tokens to learn DOS batch script through out this article.</p>
<h2>Background</h2>
<p>DOS batch script uses DOS commands with many programming stuffs. it becomes extremly powerful when programming is applied over these commands and commands output. Users only require basic programming skills with excellent knowledge of DOS commands to learn batch programming. as I explained above ,I am a BI and Database consultant so my research and article contents is based on my that experience only.</p>
<h2>Using the code</h2>
<p>Launch command prompt and start DOS batch programming. you can create batch script in notepad++.batch script has extension .bat.</p>
<p><b>Demo operator in DOS batch programming</b></p>
<pre lang="SQL">@echo off
rem demo all arithmetic operator

rem set /p is used for prompt reading on variable
set /p val1=&quot;Enter first value :&quot;
set /p val2=&quot;Enter second value :&quot;

echo ********* arithmetic operator demo ************
rem set /a is used for arithmetic calculation
set /a res=%val1%+%val2%
echo Sum of %val1% and %val2% is %res%

set /a res=%val1%-%val2%
echo Subtraction of %val1% and %val2% is %res%

set /a res=%val1%*%val2%
echo Multipication of %val1% and %val2% is %res%

set /a res=%val1%/%val2%
echo Division of %val1% and %val2% is %res%

set /a res=%val1%%%val2%
echo Modulo division of %val1% and %val2% is %res%

echo ********* relational operator demo @@ geq,gtr,equ,lss,leq @@************
if %val1% gtr %val2% (
echo %val1% is greater than %val2%
) else (
if %val1% lss 10 (
echo %val1% is even less than 10
) else (
echo %val1% is less than %val2%
)
)
              
            </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demooperator.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demooperator.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demooperator.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demooperator.jpg" border="0" /></a></p>
<p>In above operator demo batch script , i have described all arithmetical operator and relational operator used in batch programming. it will accept 2 values from user and perform arithmetical and relational calculation on it. I have used set /a command to perform arithmetical operation and set /p to accept input from user.</p>
<p><b>Demo if-else in DOS batch programming</b></p>
<pre lang="SQL">@echo off
rem check for leap year using if else
set /p yval= &quot;Enter year value :&quot;
set /a res=%yval%%%4 
if %res%==0 (
echo &quot;%yval% is a leap year&quot;
) else (
echo &quot;%yval% is not a leap year&quot;
)

rem check if file is available or not
set filename=savecustomer1.sql
if exist %filename% (
echo File exist
) else (
echo File does not exist
)

rem check exit status of last running command
DEL test.txt
if %ERRORLEVEL%==1 (
echo last operation was successful
) else (
echo problem in last operation
)

        </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoifelse.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoifelse.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoifelse.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoifelse.jpg" border="0" /></a></p>
<p>In if-else demo , I have explored how if-else works in DOS batch programming. I have used 3 example to explain it. in my first example ,I am accepting year value from user and displaying result whether given year is leap year or not. in my second example , I am checking existence of a file using if-else. in my last example , I have used ERRORLEVEL system variable to get exit status of last executed command. so that user can check whether last command execution was success or failure. for each success execution it returns 0 and 1 for failure.</p>
<p><b>Demo for loop in DOS batch programming</b></p>
<pre lang="SQL">@echo off
echo *****Simple numeric for loop*****
FOR /L %%G IN (2,1,5) DO echo %%G 

echo *****for loop working on collection*****
FOR %%G IN (Sun Mon Tue Wed Thur Fri Sat) DO echo %%G 

echo *****for loop /R reading files of current directory recursively *****
For /R %%G in (*.*) do Echo &quot;%%G&quot; 

echo ***** looping file contents @@@ Reading comma separated file @@@@******
FOR /F &quot;tokens=1,2,3 delims=,&quot; %%G IN (persondata.txt) DO @echo %%G %%H %%I
        </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoforloop.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoforloop.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoforloop.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoforloop.jpg" border="0" /></a></p>
<p>In above for loop demo, I have explain 4 example of using for loop.In my first example I have used simple loop where iteration starts from 2 and reached upto 5 incremented by 1 everytime.In my second example , I have described for loop iterating through a string collection. it will display all list available in for loop collection. In my third example, I have used for loop to recursive read all files of current directory. In my final example , I am reading a comma separated file persondata.txt and displaying all columns.</p>
<p><b>Demo SQL query execution using DOS batch shell</b></p>
<pre lang="SQL">@echo off
Rem execute SQL query from batch file
sqlcmd -S .\sql2012 -Q &quot;insert into SQLGD.dbo.customer values(1,&#39;Ajit Kumar Thakur&#39;)&quot;

Rem execute SQL query from SQL file
sqlcmd -S .\sql2012 -i SaveCustomer.sql
        </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoexecsqlquery.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoexecsqlquery.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoexecsqlquery.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoexecsqlquery.jpg" border="0" /></a></p>
<p>In above shell script demonstration, I have used SQLCMD command line utility to connect sql server database.I have used windows authentication mode to connect with database server. one can use other different option with SQLCMD to perform database related operation from DOS batch script. In my first example I have executed insert script while in my other example I am executing SQL query available in SaveCustomer.sql file.</p>
<p><b>Demo execution of multiple DOS batch script from another batch script </b></p>
<pre lang="SQL">@echo off
FOR /L %%G IN (1,1,200) DO cmd /C demoexecsqlquery
        </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demomultiplebatchfilecalling.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demomultiplebatchfilecalling.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demomultiplebatchfilecalling.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demomultiplebatchfilecalling.jpg" border="0" /></a></p>
<p>In above example, I am calling demoexecsqlquery.bat file 200 times. so 200 separate command session will generate and execute scripts inside it.</p>
<p><b>Demo of Incremental file loading through DOS batch script</b></p>
<pre lang="SQL">@echo off
rem processing incremental load using batch file
echo processing incremental load

For /R %%A in (demofileprocessing\curversion\*.txt) do (
	set %dupflag%=0
	For /R %%B in (demofileprocessing\preversion\*.txt) do (
	rem compare current version file with previous version file repositiry
	fc %%A %%B &gt; 0
	rem check for same data file repeating in new version
	if %errorlevel%==1 (
			set %dupflag%=1
			)		
	)
	 if %dupflag%==1 (
		rem copy incremental file in separate location
		copy %%A demofileprocessing\incrementalfile		
	 ) else (
		rem copy duplicate file in other location
		copy %%A demofileprocessing\duplicatefile	
	 )
)
     </pre>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoincrementalloading_1.jpg" original-url="https://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoincrementalloading_5F00_1.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/demoincrementalloading_1.jpg" original-url="https://blogs.technet.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-04-48/demoincrementalloading_5F00_1.jpg" border="0" /></a></p>
<p>In above batch programming example , I am reading all files from curversion folder. checking if same file were available in previous version or not. if it is new file then copy file into incrementalfile folder otherwise copy it into duplicatefile folder.</p>
<h2>Points of Interest</h2>
<p>This article explain programming tokens of DOS batch programming.it also describe how we can use SQLCMD in batch programm and how programming flow of DOS batch script works. I hope my effort will help to someone in learning of DOS batch script. Happy scripting......</p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
    <item>
      <title>Understanding Data warehouse concepts</title>
      <link>https://docs.microsoft.com/archive/blogs/dbtechresource/understanding-data-warehouse-concepts</link>
      <pubDate>Sat, 04 Apr 2015 07:37:48 GMT</pubDate>
      <dc:creator><![CDATA[Ajit Kumar Thakur]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.technet.microsoft.com/dbtechresource/2015/04/04/understanding-data-warehouse-concepts/</guid>
      <description><![CDATA[Introduction
Online transaction processing (OLTP) database contains huge transaction record.some...]]></description>
      <content:encoded><![CDATA[<p></p>
<h2>Introduction</h2>
<p>Online transaction processing (OLTP) database contains huge transaction record.some time it has million and billions of rows.these data is stored in relational database.when business require analysis of these transaction, it takes huge amount of time to process these data. business user wants to analyse these data in small time period. they dont want to have complexity in schema too. Sometimes business user wants to analyse data from other source too. these other source data could be from different business sources. So database designer comes with a solution to implement Datawarehouse system for business data. this system is separate from OLTP database. So analysis process becomes easier than before.</p>
<h2>Background</h2>
<p>Datawarehouse system consist of Fact table , dimension table and Auxiliary table. Datawarehouse system can have multiple OLTP system as data source. it can be CRM system,ERP system, CMS system or Flat file data. Tables in Datawarehouse system are organised in specific schema. this schema can be either star schema or snowflake schema. we are going to cover each topic of datawarehouse system in same article.</p>
<h2>Using the code</h2>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Datawarehouse.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Datawarehouse.jpg" border="0" /></a></p>
<pre>CREATE TABLE SalesRegion (
                SalesRegionId INTEGER NOT NULL,
                RegionName VARCHAR(50) NOT NULL,
                CONSTRAINT SalesRegion_pk PRIMARY KEY (SalesRegionId)
);


CREATE TABLE DimSalesMan (
                SalesRegionId INTEGER NOT NULL,
                SalesManId INTEGER NOT NULL,
                SallesmanName VARCHAR(50) NOT NULL,
                CONSTRAINT DimSalesMan_pk PRIMARY KEY (SalesRegionId, SalesManId)
);


CREATE TABLE DimDate (
                DateId INTEGER NOT NULL,
                DateValue DATE NOT NULL,
                MonthValue INTEGER NOT NULL,
                YearValue INTEGER NOT NULL,
                DateQuarter INTEGER NOT NULL,
                DateHalfYear INTEGER NOT NULL,
                CONSTRAINT DimDate_pk PRIMARY KEY (DateId)
);


CREATE TABLE Currency (
                CurrencyId INTEGER NOT NULL,
                CurrencyName VARCHAR(50) NOT NULL,
                CurrencyFxRate DECIMAL(18) NOT NULL,
                CONSTRAINT Currency_pk PRIMARY KEY (CurrencyId)
);


CREATE TABLE DimProduct (
                ProductId INTEGER NOT NULL,
                CurrencyID INTEGER NOT NULL,
                ProductName VARCHAR(50) NOT NULL,
                ProductCost NUMERIC(18,2) NOT NULL,
                CONSTRAINT DimProduct_pk PRIMARY KEY (ProductId, CurrencyID)
);


CREATE TABLE FactSales (
                SalesRegionId INTEGER NOT NULL,
                SalesManId INTEGER NOT NULL,
                ProductId INTEGER NOT NULL,
                CurrencyID INTEGER NOT NULL,
                DateId INTEGER NOT NULL,
                SalesId INTEGER NOT NULL,
                SalesDescription VARCHAR(100) NOT NULL,
                CONSTRAINT FactSales_pk PRIMARY KEY (SalesRegionId, SalesManId, ProductId, CurrencyID, DateId)
);


ALTER TABLE DimSalesMan ADD CONSTRAINT SalesRegion_DimSalesMan_fk
FOREIGN KEY (SalesRegionId)
REFERENCES SalesRegion (SalesRegionId)


ALTER TABLE FactSales ADD CONSTRAINT FactSales_DimSalesMan_fk
FOREIGN KEY (SalesRegionId, SalesManId)
REFERENCES DimSalesMan (SalesRegionId, SalesManId)

ALTER TABLE FactSales ADD CONSTRAINT FactSales_DimDate_fk
FOREIGN KEY (DateId)
REFERENCES DimDate (DateId)


ALTER TABLE DimProduct ADD CONSTRAINT Currency_DimProduct_fk
FOREIGN KEY (CurrencyID)
REFERENCES Currency (CurrencyId)


ALTER TABLE FactSales ADD CONSTRAINT FactSales_DimProduct_fk
FOREIGN KEY (ProductId, CurrencyID)
REFERENCES DimProduct (ProductId, CurrencyID)

    </pre>
<p><b>Fact Table</b></p>
<p>Table which contains fact information is known as fact table. these infomation can be measure in analysis. such as Total Sales Amount,Total Order Count,Total Product Sales etc are different measures of business. these measure information are stored in Fact table. Normally Fact table contains transaction of business. eq: FactSales table is fact table. it contains business transaction.</p>
<p><b>Dimension Table</b></p>
<p>Table which contain dimension for analysis of data is known as Dimension table. it can be Date Dimension,Product Dimension,Region Dimension,Currency Dimension etc. Analysis of Fact table are process by Dimension table. one can analyse business transaction on the basis of period wise,region wise,product wise. Data in dimension table are normally fixed nature.these data normally does not modify or modify in some condition when updated set is required in business. it may be modify in a month or in a year. eq. DimDate,DimProduct,DimRegion are dimension table.</p>
<p><b>Attribute of Dimension Table</b></p>
<p>attribute of dimension table could be product name,product cost,product color,product category, product weight etc</p>
<p><b>Natural Key</b></p>
<p>The default key assigned to attribute is known as Natural key. eq.ProductCode is natural key for any product.</p>
<p><b>Surrogate Key</b></p>
<p>Numeric value used as key which is used to join dimension table with fact table is known as surrogate key eq.ProductId is surrogate key for product dimension table. it joins with FactSales fact table to get product sales information.</p>
<p><b>Database Schema</b></p>
<p>Datawarehouse is a relational database where Fact and Dimension table are related with each other. before defining datawarehouse sytem, its structure must be define.All table in datawarehouse are structured in specific schema. it can be Start Schema or Snowflake schema</p>
<p><b>Star Schema</b></p>
<p>Database schema in which dimension table are directly connected with fact table is known as Star Schema. it is most popular schema used in desinging datawarehouse system. it is easy to implement and relate dimension tables with fact tables.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Starschema.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Starschema.jpg" border="0" /></a></p>
<p><b>Snowflake Schema</b></p>
<p>Database schema in which dimension table are connected with fact table but dimension table itself related with another dimension table to get data is known as Snowflake Schema. snowflake schema makes datawarehouse designing complex. if possible we should avoid snowflake schema using view where multiple dimension table are joined together and used as simple dimension table.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Snowflake.jpg"><img alt=" " src="https://msdnshared.blob.core.windows.net/media/TNBlogsFS/prod.evol.blogs.technet.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/04/48/Snowflake.jpg" border="0" /></a></p>
<p><b>Junk Dimension</b></p>
<p>Some value in data warehouse system are very less in number of rows. we can not include them as dimension table and also can not avoid in system.such as Global setting value for datawarehouse system. we can put all require global setting in separate setting table but it is not considered as dimension table. it is termed as Junk Dimension.</p>
<p><b>Degenerate Dimension</b></p>
<p>Some tables in datawarehouse system contains atribute of fact table. these attribute are used in analysis of business. such as Transaction number in fact table is maintained as Degenrate dimension.</p>
<p><b>Slowly changing Dimension</b></p>
<p>It is process mananging changes of data in dimension table.when data in dimension table is modified, it is required to maintain change history of data. it gives accurate picture to business when analysis is depend on different duration of time. eq.Global business sales is depend on currency rate. each country has their different currency and their exchange rate gets updated time to time. if some sales is occured in Jan 2014 with XXX currency exchange rate and it is modified in July 2014. correct analysis is only possible when we can evaluate sales value exactly based on that duration exchange rate. if we calculate sales amount on current exchange rate value , then sales figure will not be accurate.</p>
<p><b>SCD type1</b></p>
<p>In SCD type1 ,dimension table overwrite existing value of dimension attribute with new value. So no change history is maintained for any changed attribute value.dimension table will contain only last updated value. eq.In dimcustomer table , customer address can be maintain as SCD type1. so that it will hold only current address of customer.</p>
<p><b>SCD type2</b></p>
<p>In SCD type2, complete track of change history is maintained. so for every changes in attribute value insert new record in dimension table. history is track through date range given with record. eq:DimCurrencyFxRate should be of type SCD type2. because currecny exchange rate is valid from specific date to certain date range only.</p>
<p><b>SCD type3</b></p>
<p>In SCD type3, only last few change history is maintain. number of changes tracking is based on business requirement. so such dimension table contains multiple column for same attribute. eq:DimProduct table can contain three column name for Productname naming Productname1, Productname2, Productname3. this will help when business team ask to change the name of any product.Productname3 will contain latest change name , so on Productname2 and Productname1 can contain previous 2 name of product.</p>
<p><b>Bridge table or Factless fact table</b></p>
<p>it is intermediate table which allows to join dimension table with another dimension table. it does not contain transaction detail rather it contains key attribute with other columns.</p>
<p><b>Snapshot fact table</b></p>
<p>Table which contains aggregate of transaction of Fact table is known as snapshot fact table.when business transaction is huge,entry in fact table will be huge. this will make analysis process time consuming. so that fact table transaction are aggregated and stored in separate snapshot table.</p>
<p><b>Transaction fact table</b></p>
<p>Table which contains complete details of transaction is known as transaction fact table. attribute in transaction fact table contains each details of transaction. eq: transaction number,productid,transaction date,transaction user etc.</p>
<h2>Points of Interest</h2>
<p>This article contains information on terminologies used in datawarehouse. this will help user to understand concepts before designing new datawarehouse system.</p>
<h2>History</h2>
<p>No updates available</p>]]></content:encoded>
    </item>
  </channel>
</rss>