D V T Using Power BI Unit 3
D V T Using Power BI Unit 3
What is Canvas?
In General Use:
A canvas refers to the workspace or area where designers can create and edit
graphics, such as in Photoshop, Figma, or other design tools.
A platform for educational institutions where students and teachers can interact,
manage courses, submit assignments, and share resources online.
Tools like bar charts, scatter plots, and dashboards help visualize patterns and
trends in data.
Example: Sales performance analysis, financial forecasting.
Visual aids like infographics, diagrams, and videos simplify complex topics.
Example: Teaching scientific concepts using animations.
Medical Imaging
Visualization tools display internal body structures for diagnosis and treatment.
Example: X-rays, MRIs, CT scans.
Business Intelligence
Dashboards and reports visually represent KPIs (Key Performance Indicators) and
insights.
Example: Market trends, customer behavior analysis.
Scientific Research
Virtual reality (VR), animations, and visual effects (VFX) enhance user experiences.
Example: Video games, animated movies.
Visuals like ads, posters, and videos create engagement and convey messages
effectively.
Example: Social media campaigns, product showcases.
1. Import Mode
Description: Data is fully imported into Power BI's in-memory model.
Features:
Faster performance for analytics.
Allows complex calculations using DAX.
Suitable for small-to-medium datasets.
Sources: Excel, SQL Server, SharePoint, CSV files, etc.
Use Case: When you need high-speed analysis and don't require real-time
updates.
2. DirectQuery Mode
Description: Data remains in the source system, and Power BI queries the data
directly.
Features:
Real-time or near-real-time data updates.
No need to store data in Power BI.
Slower performance for large or complex queries.
Sources: Databases like SQL Server, Oracle, Azure SQL Database.
Use Case: When you need up-to-date data from large databases.
3. Live Connection
Description: Similar to DirectQuery but specific to online analytical processing
(OLAP) models like SQL Server Analysis Services (SSAS) and Power BI Datasets.
Features:
Leverages pre-built data models.
No data is imported; the report directly connects to the existing model.
Sources: SSAS Tabular, Power BI Service.
Use Case: When a centralized data model is already available.
4. Composite Model
Description: Combines Import and DirectQuery modes in a single model.
Features:
Flexibility to use both in-memory and real-time queries.
Allows optimization of performance while retaining real-time capabilities.
Sources: Databases, files, and cloud services.
Use Case: When you need a mix of real-time and historical data.
5. Dataflows
Description: Power BI Dataflows allow you to prepare and transform data in the
Power Query Online interface and then use it in multiple reports.
Features:
Reusable data preparation workflows.
Supports large-scale ETL processes.
Sources: Cloud services, databases, and files.
Use Case: When preparing reusable datasets across multiple reports.
7. Flat Files
Description: Import data from files stored locally or on the cloud.
Examples:
CSV, Excel, JSON, XML.
Use Case: For ad-hoc analysis and small datasets.
Queries are sent to the data source in real-time, ensuring users always work with
the latest data.
No need to load data into Power BI's in-memory model, which avoids size
limitations and reduces memory usage.
Since data is not imported, it saves storage space and keeps the Power BI file size
small.
Data Security
Security and access control are managed at the data source level, maintaining
enterprise-level protection.
Works well with enterprise-grade databases like SQL Server, Oracle, and cloud-
based sources like Azure.
Ideal for organizations that already have robust, optimized databases and want to
avoid duplicating data.
Faster Development
Enterprise Collaboration
Multiple teams can connect to and use the same data model, ensuring uniformity
and reducing duplication of effort.
Simplified Maintenance
Changes to the data model (e.g., schema updates) are done centrally and
automatically reflected in all connected reports.
1. Data Access
Power BI allows you to connect to various data sources. Once the data is loaded,
it is available for visualization and analysis.
Common Data Access Options:
Import Mode: Loads data into Power BI's in-memory model for high-speed
analysis.
DirectQuery: Connects to live databases and fetches data in real time.
Live Connection: Connects to a centralized data model without importing data.
Dataflows: Access reusable datasets created within Power BI Service.
Custom APIs: Connect to proprietary systems or APIs for custom data extraction.
2. Data Fields
Fields represent the columns from your dataset and are the building blocks of
your visualizations. They are categorized as:
Types of Fields:
Numerical Fields: Represent numeric data (e.g., sales, revenue).
Used for calculations, aggregation (e.g., sum, average).
Example: Revenue = $100,000.
Text Fields (Categorical): Represent labels or categories (e.g., product names,
regions).
Used for grouping data.
Example: "Product A", "USA".
Date/Time Fields: Represent dates and times.
Used for time-based trends and analysis.
Example: "01-Jan-2025".
Measures: Calculated fields created using DAX formulas for dynamic calculations.
Example: Total Sales = SUM(Sales Amount).
Calculated Columns: Fields created by applying DAX expressions on existing fields.
3. Filters
Filters in Power BI allow you to narrow down the data being visualized.
Types of Filters:
Visual Filters:
Page Filters:
Applied to an entire page, affecting all visuals on that page.
Example: Filter sales data by "2023".
Report Filters:
Slicer Filters:
Drillthrough Filters:
4. Visualization
Visualizations in Power BI present data fields in an easy-to-understand format.
Common Visualization Types:
Bar/Column Chart:
Line Chart:
Pie/Donut Chart:
Scatter Plot:
Map Visualization:
Card Visualization:
Gauge Chart:
Drag fields into Axis, Values, Legend, and other areas in a visualization pane.
Example: Drag "Date" to the axis and "Sales" to values for a line chart.
Example: A dashboard page filtered to display data for a specific year, while other
pages show a broader view.
Example: Ensuring that all charts and tables on a page display data for only one
department.
In Power BI Desktop, the Filters pane is available on the right side of the screen.
After adding the field, select the filter values you want to apply.
Example: Select "North America" in the Region field to display only North
American data.
Check the visuals on the page to ensure they update based on the filter applied.
Report Filters apply to all pages and visualizations within a Power BI report. They
provide a way to globally filter the dataset for consistent insights across the entire
report.
How Report Filters Work:
Scope: Affects all pages in the report.
Example Use Case: If you want a report to show data for a specific region (e.g.,
"Asia") or a specific year (e.g., 2024), apply a report filter.
Steps to Apply a Report Filter:
Open the Filters pane in Power BI.
Drag the desired field (e.g., Region, Year) to the "Filters on all pages" section.
Select the filter values to apply globally.
All pages will update to reflect the selected filter criteria.
2. Conditional Filters
Conditional Filters use logical conditions or rules to dynamically filter data. These
filters are often based on DAX expressions or conditions like ranges, thresholds, or
comparisons.
How Conditional Filters Work:
Filters based on criteria (e.g., greater than, contains, starts with).
Commonly used in visual-level filters or slicers.
Enables dynamic filtering based on user input or predefined logic.
Example Use Case:
Show only sales greater than $10,000:
Drag the Sales Amount field to the visual filter section.
Set the condition: Sales Amount > 10,000.
Display products whose names start with "A":
Set the condition: Product Name starts with "A".
Steps to Apply Conditional Filters:
Drag a field to the Filters pane (for visual, page, or report-level filters).
Use the filter options to set conditions (e.g., greater than, less than, equals,
contains).
Power BI will display data matching the criteria.
3. Clearing Filters
Clearing Filters removes any applied filters, allowing you to view the complete
dataset.
How to Clear Filters:
Go to the Filters pane, and click the eraser icon next to the filter.
Click the "Clear Filters" button at the top of the Filters pane.
If slicers are used for filtering, select the clear selection button on the slicer visual.
Example Use Case:
If you’ve applied multiple filters to a sales report (e.g., filtering by region, year,
and product), you can clear all or specific filters to reset the view and see the
unfiltered data.
1. Testing Datasets
Testing datasets ensures the data is accurate, complete, and ready for analysis.
Steps for Testing Datasets:
Ensure each column has the correct data type (e.g., Date, Text, Number).
Adjust data types if necessary by selecting the column and choosing the
appropriate type from the toolbar.
Remove duplicates, trim white-space, and replace missing values using Power
Query tools.
Add conditional columns or calculated fields for specific business rules.
Instead of loading the entire data-set, use a Top N rows query to test smaller data
samples.
Use Test Visualizations:
Create a few simple visuals to verify the data-set produces correct insights.
Combine Data:
Use Merge Queries to combine data from multiple tables based on a common
column.
Example: Combine Sales and Customer data using Customer ID.
Filter Rows:
Use the Filter Rows option to create a table with only relevant data.
Example: Filter sales data to include only the last 12 months.
Group Data:
Rename columns for better readability and reorder them to match the desired
structure.
Creating Customized Tables with DAX:
Create New Tables:
Calculated Columns:
Calculated Tables:
Hide/Show Columns:
Set the default sort order for columns using Sort By Column.
Example: Sort months by a custom column (e.g., Month Number).
Column Formatting:
Relationships:
Sizing and dimensions refer to how you manage the layout, visuals, and elements
within a Power BI report to make it visually appealing and easy to interpret.
1. Sizing in Power BI
Sizing determines the size of visuals, elements, and the report canvas to optimize
the user experience.
Key Aspects of Sizing:
Canvas Size:
You can adjust the overall size of the report canvas based on how and where the
report will be viewed (desktop, tablet, or phone).
Go to View > Page View > Select a predefined size (e.g., 16:9, 4:3, or custom
dimensions).
Visual Size:
Resize charts, tables, slicers, and other visuals to fit the report layout.
Drag the edges of visuals or specify dimensions in the Format Pane under General
> Properties.
Responsive Sizing:
Many visuals, such as tables and charts, adjust automatically to the size of the
container to fit different screens.
Enable responsive layouts in the visual properties for better scalability.
Best Practices for Sizing:
Ensure important visuals are large enough to be legible.
Align visuals for a clean, professional layout.
Leave enough white space for readability and avoid overcrowding.
2. Dimensions in Power BI
Dimensions refer to data categories (fields) used to group or segment data in
reports. These are typically categorical fields like region, product, or department.
Types of Dimensions:
Static Dimensions:
Dynamic Dimensions:
Summary
Aspect Description
Adjusting canvas, visuals, and layouts for better readability and user
Sizing
experience.
Data fields (e.g., Region, Product) used to group or segment data in
Dimensions
visualizations.
Best Keep visuals proportional, align them properly, and use dimensions
Practices relevant to your analysis.
By managing sizing and dimensions effectively, you can create reports that are
both visually appealing and easy to navigate, making your Power BI dashboards
more impact-ful.
1. Positions
Positioning refers to how visuals, slicers, and other elements are arranged on the
Power BI canvas. Proper positioning helps create a clean and organized report
layout.
Positioning Visuals:
Manual Positioning: You can drag and drop visuals on the canvas to manually
adjust their placement.
Enable gridlines to make it easier to align visuals and maintain consistent spacing.
Enable Snap-to-Grid to automatically position visuals on a predefined grid.
In the Format Pane, under General > Position, you can enter specific values for
the X (horizontal) and Y (vertical) positions of a visual.
Example: Position a chart at X=100, Y=200 to place it exactly where needed.
Best Practices for Positioning:
Keep visuals aligned and ensure there is adequate spacing between them.
Position important visuals (like KPIs or high-level charts) at the top for better
visibility.
Maintain a logical flow from left to right or top to bottom based on how the
report will be consumed.
2. Alternate Text
Alternate Text (also called Alt Text) is a feature in Power BI used for improving
accessibility, especially for users who rely on screen readers.
Purpose of Alternate Text:
Helps describe visuals and charts to users who have visual impairments.
Provides a textual description of what a visual represents or what data is being
shown.
Improves report accessibility and ensures compliance with accessibility standards.
How to Add Alternate Text:
Select the Visual: Click on the visual to which you want to add alternate text.
Open the Format Pane: On the right, under Format options, click on General.
Add Alt Text:
Under the Alt Text section, toggle On.
Enter a descriptive text in the box provided, explaining what the visual represents.
Example: For a sales chart, enter: "This chart shows the total sales by region for
the year 2024."
Best Practices for Alternate Text:
Be concise but descriptive—explain what the visual shows without excessive
detail.
For complex visuals (e.g., pie charts, stacked bar charts), ensure to include a
summary of key insights.
Ensure alternate text is updated if the visual or data changes.
3. Tiles
Pinned Tiles: You can "pin" a visual from a report or dashboard to the Power BI
service dashboard as a tile.
Pinned visuals become tiles on your dashboard, allowing you to quickly view key
insights.
Tile Sizes:
Tiles can be resized to small, medium, or large within the dashboard.
Larger tiles are used for more prominent visuals or key metrics.
Interactive Tiles:
Font Settings:
Text Alignment:
You can adjust the alignment of column headers to left, center, or right to suit
your report's aesthetic.
Set alignment by adjusting the Horizontal alignment and Vertical alignment
options.
Column Width:
By default, Power BI adjusts the column width based on the content, but you can
manually change the width by dragging the column edges.
Auto-size option can be turned off if you prefer fixed column widths.
Background Color:
Set a background color for the column headers to differentiate them from the
data rows.
You can set a solid color or apply conditional formatting to change the header
color based on specific conditions (e.g., highlight if the value exceeds a threshold).
Text Wrapping:
Enable Text Wrapping to ensure the text in column headers fits within the cell
width.
Useful when the column name is long and needs to be displayed in multiple lines.
Border Settings:
Add borders around column headers for better visual separation from the data.
Best Practices for Column Headers:
Use a bold font for the headers to make them stand out.
Keep the column names short but descriptive.
Use alternating colors or shading to visually distinguish between the header and
data rows.
Font Settings:
Just like column headers, you can adjust the font type, size, color, and style (bold,
italic, underline) of row headers.
Go to Format Pane > Row headers to modify these settings.
Text Alignment:
Row Padding:
Row header padding refers to the space between the text and the edge of the
cell.
You can adjust this under the Row padding settings to ensure the text doesn't
look cramped.
The height of the row headers can be adjusted manually by dragging the header's
edge.
Row height can be controlled through the Row Padding option or by turning off
auto-sizing.
Background Color:
Set a background color for row headers to differentiate them from the data cells.
Conditional formatting can also be applied to change the row header background
color dynamically based on specific rules.
Expand/Collapse Options:
Alignment and Spacing: Ensure that both column and row headers are well-
aligned and have enough space for text. Avoid overcrowding by adjusting the font
size or using text wrapping.
Consistency: Maintain consistent formatting across headers (both row and
column) for a clean and professional look.
Readability: Use a font size large enough for readability but small enough to avoid
taking up excessive space. A font size of 10-12pt works well in most scenarios.
Visual Hierarchy: In case of hierarchical row headers (e.g., Year > Quarter >
Month), visually distinguish between levels using indentation or color variations.
Go to Format Pane: Select your visual (table or matrix) and open the Format Pane.
Column Header:
Change the font color to blue, bold the text, and set the background color to light
gray.
Enable Text Wrapping for long column names.
Adjust Column Width to fit the content.
Row Header:
Set the font size to 11pt, align text to the left, and apply conditional formatting to
change background color based on values.
Enable expand/collapse for hierarchical data.
Grid properties in Power BI allow you to control the layout of the data in tables,
matrices, and charts. The grid structure provides clear organization by aligning
data into rows and columns, and styling options help improve readability and
aesthetics. These properties and styles are essential for creating a neat and
professional-looking report.
Vertical Grid Lines refer to the lines that separate the columns in a table or
matrix.
Horizontal Grid Lines refer to the lines separating the rows of data in a table or
matrix.
Just like vertical grid lines, horizontal grid lines can be turned on or off.
In the Format Pane, under Grid, toggle Horizontal grid to show or hide the lines.
Set the color of horizontal grid lines to ensure they match or contrast with the
design of your report.
Choose from a range of colors or use a custom color to match the branding.
Adjust the thickness of the horizontal grid lines, depending on the visual effect
you want.
Thin lines are subtle and less distracting, while thicker lines can be used for
emphasis.
Transparency:
Control the transparency of horizontal grid lines to make them less prominent
and allow the data to stand out more.
2. Grid Styles and Formatting
Power BI also allows you to style grids to enhance the user experience and visual
appeal. This includes options like borders, alternating row colors, font sizes, and
more.
Grid Style Customizations:
Borders: You can add or adjust borders between rows and columns to give your
table or matrix a more structured appearance.
Navigate to Format Pane > Grid and enable Borders for better separation.
For tables and matrices, you can alternate row colors to improve readability.
Under Format Pane > Grid > Row header, enable Alternating row colors and
choose colors for odd and even rows.
This helps users visually differentiate between rows quickly.
You can change the font style, size, and weight (bold, italic) of text within the grid
cells to improve readability.
This is done under Format Pane > Values and modifying the Font Size and Font
Family.
Cell Padding:
Padding refers to the space around the content inside each grid cell. Adjust
padding to ensure that the text is not cramped and has enough space.
You can adjust cell padding in the Grid settings to control the amount of spacing
between the text and the grid's borders.
Conditional Formatting:
Conditional Formatting allows you to change the appearance of grid elements
based on the data itself.
For example, you can change the background color of cells based on values (e.g.,
highlight cells with values above a certain threshold).
This helps make important data stand out visually.
Text Wrapping:
If your text is longer than the available cell width, you can enable Text Wrapping
to display the full content on multiple lines within the cell.
This is done under the Format Pane > Grid > Text Wrapping.
Consistency: Maintain consistency in grid line styles (e.g., color and thickness)
across all visuals to ensure a professional and uniform appearance.
Clarity: Use alternating row colors, borders, and sufficient padding to make data
easy to read and separate logically.
Minimalism vs. Detail: Avoid overcrowding grids with too many lines or heavy
formatting. Instead, aim for clarity and focus on essential data by using subtle grid
lines and light background colors.
Table Styles and Alternating Row Colors in Power BIPower BI provides several
options for customizing table styles and applying alternating row colors to improve
readability and visual appeal. These features help in organizing and distinguishing
data effectively.1. Table Styles in Power BIPower BI offers predefined table styles
that you can apply to quickly format tables and matrices. These styles control
background colors, grid lines, borders, font styles, and padding.Applying a Table
StyleSelect the Table or Matrix Visual:Click on the table or matrix visualization in
Power BI.Open the Format Pane:In the Visualizations Pane, click on the Format
icon (paint roller).Select Table Style:Navigate to Style Presets under the Grid or
Table Styles section.Choose from the available styles such as:MinimalBold
HeaderAlternating RowsCondensedOutlineNone (to create a custom style
manually).Customize Further (Optional):If the preset does not fully meet your
requirements, you can further tweak:Font size and color for headers and
values.Border thickness and visibility.Grid line styles (horizontal, vertical, both, or
none).2. Alternating Row ColorsAlternating row colors help improve readability
by visually distinguishing different rows.Steps to Apply Alternating Row
ColorsSelect the Table or Matrix Visual.Open the Format Pane (paint roller
icon).Expand the Grid Section.Find the “Alternating Row Colors” Option.Turn It
On.Choose Row Colors:Set Primary Row Color (e.g., white or light gray).Set
Alternate Row Color (e.g., light blue or beige).Adjust transparency if
needed.Customizing Alternating Row ColorsGradient Effect: Use slightly different
shades instead of sharp contrasts.Conditional Formatting: Apply dynamic row
colors based on values.Dark Mode Compatibility: Choose darker shades for dark-
themed reports.
Focus Mode and Totals Computations in Power BIPower BI provides Focus Mode
to help users analyze data more effectively and Totals Computations to summarize
data in tables, matrices, and other visuals.1. Focus Mode in Power BIFocus Mode
allows you to expand a visual to full-screen mode, making it easier to examine
details without distractions from other visuals on the report page.How to Use
Focus ModeSelect a Visual (Table, Matrix, Chart, etc.).Click on the "Focus Mode"
Icon (Located at the top-right corner of the visual).Full-Screen View: The selected
visual expands, hiding other elements on the report.Exit Focus Mode: Click the
“Back to Report” button to return to the normal view.Benefits of Focus Mode ✔
Better Visibility – Ideal for examining large tables or detailed visuals. ✔ Less
Distraction – Helps focus on one dataset at a time.✔ Easier Analysis – Enhances
data readability, especially for complex visuals.2. Totals Computations in Power
BIPower BI automatically computes totals and subtotals for table and matrix
visuals. These totals summarize column values, making it easier to analyze
aggregated data.Types of Totals in Power BIGrand Total – The sum of all rows or
columns.Subtotals – Summarized values within grouped categories.Row Totals –
Total of all values in a row.Column Totals – Total of all values in a column.How
to Enable or Customize TotalsSelect the Table or Matrix Visual.Go to the
"Format" Pane (Paint Roller Icon).Expand the “Subtotals” or "Total"
Section.Enable or Disable Totals:Toggle “Row Totals” and “Column Totals” ON
or OFF.Customize total labels, colors, and formatting.Apply Aggregations:Change
SUM, AVERAGE, MIN, MAX, COUNT as needed.Use DAX formulas for custom
computations.