Книга: Power BI: 3 in 1- Comprehensive Guide of Tips and Tricks to Learn the Functions of Power BI+ Simple and Effective Strategies+ Advanced Guide to Learn the Advanced Realms of Power BI
Назад: Power BI: A Disruptive Reporting Platform
Дальше: Power BI Desktop Functionalities

 

 

Here you will see the information about Power Bi architecture and how to create, publish, and schedule a Power BI dashboard, how to create parameters, and also limitations of Power BI.

Data Sources: In power BI data sources can be broadly classified into two types cloud data sources and On-premise data sources.

On-premise databases: Oracle, My SQL, Teradata, SAP HANA, SQL Server Analysis Services(SSAS), Sybase, IBM DB2.

On-premise files: Excel, CSV, XML, Text files.

Power BI Authoring PC: This authoring machine should have two components installed they are:

Power BI Portal: It is where users publish their datasets and reports, create dashboards and content packs, and share data with team members of their organization. Users can sign in to the portal using their organization account. Each user will have a personal workspace in the portal named My Workspace, which comprises dashboards, reports, and datasets published by the user.

End Users: Dashboards can be shared via email with multiple stakeholders. Power BI offers a free mobile app for IOS, Android, and Windows devices. Reports and dashboards automatically adjust their sizes to fit the screen of the device, so users need not worry about creating mobile versions of the work. Users can interact with reports and dashboards through filters, slicers, drilling, etc.

Creating a Dashboard

Importing data source

Designing the Dashboard

Below are the requirements that should be achieved while designing a dashboard

Requirement-1: To display overall total sales of the company.

Requriment-2: To create drill down on SalesTerritoryGroup> SalesTerritoryCountry> SalesTerritoryRegion and compare total sales.

Requirement-3: To show sales for product subcategories in the selected product category for both internet and reseller sales.

Requriment-4: Locate countries and their respective sales on a geographical map.

Requirement-5: Create a filter on the sales territory group.

Now let us understand each requirement one by one.

Requirement-1: To display the overall total sales of the company.

TotalSalesbyDAX = SUM(FactInternetSales[SalesAmount]) + SUM(FactResellerSales[SalesAmount])

Requriment-2: To create drill down on SalesTerritoryGroup> SalesTerritoryCountry> SalesTerritoryRegion and compare total sales.             

Requirement 3: To show sales for the product subcategories in the selected product category for both internet and reseller sales.

 

Steps to Create a treemap for Internet Sales

EnglishProductCategoryName> EnglishProductSubCategoryName so right-click on bikes and do drill down the sales for different subcategories of bikes can be seen.     

 

Steps to Create a treemap for Reseller Sales

 

This creates treemaps that show the sales made through the internet and reseller in various product categories.

Requirement 4: Locate countries and their respective sales on a geographical map.

 

Steps to Create a Map Visualization

       To fulfill this requirement, map visualization can be used.

Requirement 5: Create a filter on the sales territory group.

 

 

 

Steps to Add a Slicer
Publishing a Dashboard
Scheduling a Dashboard

 

 

Requirement: Create parameter on sales territory group

In the current scenario, Europe is taken.

Packages that have functions and cursors can be created in oracle, and when that particular package and function is called, it gives the data. In power BI w oracle packages can be called, which will load the data.

 

Requirement: create an oracle package on the customer table when ‘M’ is passed as an input value. It should show the male customers details as output, and if ‘F’ is passed, it should show the female customers details as output.

The package code looks like below:

CREATE OR REPLACE

PACKAGE customer

AS

CURSOR c_tr_customer (p_gender     string default null)

is

select * from "customer" where "Gender"=(p_gender);

TYPE customer_type IS TABLE OF c_tr_customer%ROWTYPE;

FUNCTION Fn_customer (p_gender     string default null) RETURN customer_type PIPELINED ;

END customer

;

/

 

CREATE OR REPLACE

PACKAGE BODY customer as

FUNCTION Fn_customer (p_gender     string default null) RETURN customer_type  pipelined AS

         v_c_tr_type  customer_type;

         v_count      PLS_INTEGER := 0;

   BEGIN

FOR r IN c_tr_customer(p_gender)

         LOOP

            v_c_tr_type := customer_type(r);

            PIPE ROW(r);

            v_count := v_count + 1;

      END LOOP;

RETURN ;

 

END Fn_customer;

END customer;

/

This is how you can call oracle packages in power BI.

Назад: Power BI: A Disruptive Reporting Platform
Дальше: Power BI Desktop Functionalities