Code never lies, comments sometimes do [Ron Jeffries]

Visitors Map

Follow on Twitter

@ZammaCode
Powered by Blogger.

Wednesday, May 31, 2023

Data Connection Methods in Power BI


There are three different ways to connect to data sources in Power BI.

  • Import Data
    • In this method Power BI extracts data from source and stores it in the in-memory engine called xVelocity. xVelocity engine is optimized for data storage and performance.
    • Import data offers superior performance and enhances the overall design experience.
  • DirectQuery
    • In DirectQuery Power BI directly connects with the data source and no data is imported into Power BI. 
    • DirectQuery has certain limitations, including the lack of support for certain data sources and the incomplete compatibility with all Power Query features.
    • DirectQuery provides scalability and enables seamless data updates.
  • Live Connection
    • Similar to DirectQuery, Live connection in Power BI does not involve importing data into the Power BI. 
    • However, Live connection surpasses DirectQuery in terms of query performance, primarily because it exclusively supports Microsoft data sources such as SQL Server Analysis Services database, Azure Analysis Services database, and Power BI datasets.
    • Live connection provides performance, scalability, and enables seamless data updates.


Monday, May 29, 2023

Table, Matrix, Key Influencers, Decomposition Tree Visuals


 The following dashboard uses the Sample - Superstore  datasets to demonstrate the creation of:

  • Table
    • The Table visual is a grid where related data is displayed in 2D format i.e. rows and columns.
    • Table visual is flat, means duplicate values are displayed and not aggregated.
    • Tables are great for quantitative comparisons where you compare multiple values from different categories.
    • In Power BI the following fields are shown in details pans:
      • Columns defines the columns to be added to table
  • Matrix
    • The Matrix visual is similar to table but it can display data in multiple dimensions.
    • The Matrix aggregates the data itself and lets users drill down.
    • In Power BI the following fields are shown in details pans:
      • Row field defines the data that need to be shown in rows
      • Column field defines the data that will represent columns of matrix
      • Values define the numeric data that needs to be aggregated
  • Key Influencers
    • The Key influencers visual shows the top contributors to the selected metric value.
    • Key influencers makes use of Regression analysis.
    • In Power BI the following fields are shown in details pans:
      • Analyze field identifies the data that needs to be analyzed
      • Explain by are factors that influence the analyze field
      • Expand by field is used when analyzing a measure or summarized field
  • Decomposition Tree
    • A decomposition tree visualizes data in its components or building blocks. 
    • Decomposition tree visualize data across various categories and dimensions and allows to drill down into the data for in-depth analysis.
    • In Power BI the following fields are shown in details pans:
      • Analyze field identifies the data that needs to be analyzed
      • Explain by fields that are used to analyze or drill-down the data

Download PBIX file




Friday, May 26, 2023

Map, Filled Map, Gauge, Multi-row Card, KPI Visuals


The following dashboard uses the Sample - Superstore and Financial Sample datasets to demonstrate the creation of:

  • Map
    • Map enables to track and analyze data on a geographic level.
    • Map is integrated with Bing Maps to provide default map coordinate (called geo-coding).
    • Map visual displays points that can be scaled as area bubbles.
    • In Power BI the following fields are shown in details pans:
      • Location specify the country, city or state columns
      • Legend provides additional context or information about the data being displayed on the map
      • Latitude and Longitude specify exact coordinates
      • Bubble size specify the size of data point or bubble on the map which is usually a numeric field e.g. sum of profit
  • Filled Map
    • Filled map displays quantitative information using filled regions or polygons.
    • In Power BI the following fields are shown in details pans:
      • Location specify the country, city or state columns
      • Legend sub-categorize the data 
      • Latitude and Longitude specify exact coordinates
  • Gauge
    • Gauge or radial gauge chart shows a single value that measures progress toward a goal or a Key Performance Indicator (KPI).
    • The line or needle represents the target value while shading represents the progress toward that goal.
    • In Power BI the following fields are shown in details pans:
      • Values specify the value to be displayed e.g. average of sales
      • Minimum Value specify the minimum value for the gauge 
      • Maximum Value specify the maximum value for the gauge
      • Target Value specify the target value to be achieved
  • Multi-row Card
    • Multi-row Card visuals displays the aggregated information of a multiple numeric values in group format.
    • In Power BI the following fields are shown in details pans:
      • Fields specify the columns which are to be shown in the group on multi-row card
  • KPI
    • KPIs (Key Performance Indicators) tracks an organization’s performance in different areas toward defined targets.
    • A KPI always has a base value which is evaluated against a target value.
    • In Power BI the following fields are shown in details pans:
      • Value specify the base value that has to be evaluated
      • Trend Axis specify the time
      • Target specify the target or goal value that needs to be achieved
    • For visual SalesKPI table is created in PowerBI. 

Wednesday, May 24, 2023

Waterfall Chart, Funnel Chart, Scatter Chart, Pie Chart, Donut Chart, Treemap Visuals


 The following dashboard uses the Sample - Superstore dataset to demonstrate the creation of:

  • Waterfall Chart
    • Waterfall chart visualizes positive and negative changes to a value or displays each individual component that contributes to the final value.
    • In waterfall chart there is a starting bar that represents the initial value then we have floating bars in space that represent positive and negative changes to that initial value. Lastly, an ending bar represents the final value and takes into account the effects of all the displayed transitional values.
    • The starting and ending bars both start with baseline of zero while the floating middle bars have their own baseline, which is the previous bar’s end.
    • In Power BI the following fields are shown in details pans:
      • Category specify a chart trend usually a time-based column e.g. year
      • Breakdown specify the column in which changes are required to be explored e.g. category
      •  Y-axis specify the numeric values that needs to be plotted e.g. sum of sales
  • Funnel Chart
    • Funnel chart visualizes progression or movement of data through different stages e.g. sales funnels, recruitment processes or order fulfilment processes.
    • It can be used when you have 3 or more stages to visualize and data diminishes at each stage.
    • In funnel chart the top most bar (aka “head” or “base” of the funnel) represents 100 percent data. The subsequent bars have lengths representing the proportion to the whole.
    • In Power BI the following fields are shown in details pans:
      • Category specify stages e.g. shipping mode
      • Values specify data e.g. total sales 
  • Scatter Chart
    • Scatter chart visualizes the relationship or association between two quantitative variables e.g. how does global oil prices affect a country’s GDP?
    • In Power BI the following fields are shown in details pans:
      • Values specify the categorical column e.g. sub-category
      • X-axis specify the horizontal-axis column e.g. sum of sales
      • Y-axis specify the vertical-axis column e.g. sum of profit
      • Legend specify which column to sub-divide the whole data e.g. category
      • Size specify column on the basis of which size of dots is defined e.g. sales
      • Play axis specify the column for trend over time usually a date column
  • Pie Chart
    • Pie chart displays categorical data in a circular graph. The entire “pie” represents 100% of a whole, while the pie “slices” represent portions of the whole.
    • Primary objective of a pie chart should be to compare each group’s contribution to the whole.
    • In Power BI the following fields are shown in details pans:
      • Legend specify which column to sub-divide or slice the whole data e.g. category
      • Values specify the numerical column e.g. sum of sales
      • Details specify further column to sub-divide or slice the data
  • Donut Chart
    • Donut chart is a pie chart with its center cut out to look like a donut.
    • In Power BI the following fields are shown in details pans:
      • Legend specify which column to sub-divide the whole data e.g. category
      • Values specify the numerical column e.g. sum of sales
      • Details specify further column to sub-divide or slice the data
  • Treemap
    • Treemap chart displays large amount of hierarchical data using rectangles of decreasing sizes.
    • Rectangles in the treemap are arranged according to size.
    • Tree map visualize a part-to-whole relationship among a large number of categories.
    • A pie chart might best work with three or fewer segments, a treemap works well with many.
    • In Power BI the following fields are shown in details pans:
      • Category specify the categorical column and define structure of the treemap e.g. sub-category
      • Values specify the numeric column and define size or color of the individual rectangles e.g. sum of profit
      • Details specify further column to sub-divide the data



Thursday, May 18, 2023

Line Chart, Area Chart, Stacked Area Chart, Line & Stacked Column Chart, Line & Clustered Column Chart, Ribbon Chart Visuals


 The following dashboard uses the Sample - Superstore dataset to demonstrate the creation of:

  • Line Chart
    • Line chart depicts data which changes over the time e.g. showing the difference in profit over the time. 
    • The horizontal axis shows the continuous values e.g. week, month or year etc. 
    • The vertical axis shows the changes in data points we are interested in. This will be a statistical summary like a total or average.
  • Area Chart
    • Area chart chart combines line and bar chart to show changes in data over time. 
    • The area chart uses transparent shading to show crossover.
    • Area chart is used with multiple lines to show trend over the time or make a comparison between categories or groups e.g. comparing the profit and sales over the time.
  • Stacked Area Chart
    • Stacked area chart stacks multiple areas on top of each other. 
    • The area chart uses solid colors to show crossover.
    • The topmost line in stacked area chart will always represent the total when summing all the groups.
    • Stacked area chart is used to track not only the total value, but also to understand the breakdown of that total by categories or groups.  e.g. analyzing the yearly sales.
  • Line and Stacked Column Chart
    • Line and stacked column chart combines the stacked column and line charts. 
    • By combining stacked column and line visuals, we can make a quick comparison between two categories. E.g. comparing total sales and profits of different categories with line shows the trend of discount for each category. 
  • Line and Clustered Column Chart
    • Line and clustered column chart is the combination of line and clustered column chart.
    • Just like clustered column chart it displays and compare multiple sets of data over the same categories along with line to shows the trend. E.g. total sales of different regions for all financial quarters with line showing trend of total profit over the quarters.
  • Ribbon Chart
    • Ribbon Chart is a stacked column chart combined with line chart but with one difference that is in stacked column chart categories are shown in the order it added to the axis; However, in Ribbon chart categories are ordered which has the highest value (rank).

Download PBIX file




Wednesday, May 17, 2023

Card, Slicer and Bar Charts Visuals in Power BI Visuals


 The following dashboard uses the Sample - Superstore dataset to demonstrate the creation of:

  • Slicer
    • Slicers are visuals that filter data in the report through one or more fields.
    • By default slicer filter data on the same report page, however; through sync slicers pane from View ribbon slicer can filter data on all or selected report pages.
  • Data Card
    • Card visuals displays the aggregated information of a single numeric value.
  • Simple Bar Chart
    • Bar or Column chart is used to display categorical or discrete data. 
    • The primary variable is categorical in nature e.g. City, State etc. while the secondary variable will be numeric in nature e.g. count of sales, sum of profit etc.
  • Stacked Bar Chart
    • Stacked bar chart is similar to simple bar chart but it is used to show comparisons between categories of data, and with the ability to break down and compare parts of a whole.
  • Clustered Column Chart
    • Clustered or group column chart is used for comparing multiple sets of data over the same categories e.g. sum of profit of different regions for all financial quarters.
  • 100% Stacked Bar Chart
    • 100% stacked bar chart has the same concept but instead of actual figures it shows comparison in percentage.

Download PBIX file 



Tuesday, May 16, 2023

What is Power BI


  • Power BI is a business analytics and data visualization tool developed by Microsoft. 
  • Power BI is available in several versions:
    • Power BI Desktop; for creating reports and visualizations
    • Power BI Service; for sharing and collaboration
    • Power BI Mobile; for accessing and interacting with reports on mobile devices
  • Key features of Power BI include:
    • Data Connectivity
      • Power BI offers a wide range of connectors to connect to various data sources such as databases, cloud services, spreadsheets, and more. 
    • Data Transformation
      • Users can shape and transform data using Power Query, a data preparation tool within Power BI. 
      • It allows for data cleansing, merging, splitting, and other data transformation operations.
    • Data Modeling
      • Power BI provides a data modeling capability through Power Pivot, allowing users to create relationships between different tables, define calculations/measures using formulas, and create hierarchies to analyze data.
    • Visualizations
      • In Report View users can create interactive and visually appealing dashboards and reports using a wide range of customizable visual elements such as charts, graphs, tables, and maps. 
    • Collaboration and Sharing
      • Power BI allows users to share their dashboards and reports with others within their organization through workspace and Microsoft Teams.
    • Data Security
      • Power BI offers robust security features, including role-based access control, row-level security, and data encryption, to ensure the confidentiality and integrity of data.
    • Integration
      • Power BI seamlessly integrates with other Microsoft products and services, such as Excel, Azure, and SharePoint. 

The following diagram depicts the relationship between different Power BI components.