Friday, February 20, 2026

Introduction to Tableau – A Beginner’s Guide

📊 Tableau – Complete Detailed Notes

Teaching Version • Beginner to Advanced • With Real-Life Examples


1️⃣ What is Tableau?

Tableau is a powerful Business Intelligence (BI) and data visualization tool that helps users analyze raw data and convert it into interactive charts and dashboards.

Simple Definition:
Tableau is a tool that converts numbers and raw data into visual charts so that we can easily understand business performance.

🌍 Real-Life Example

Imagine a retail store owner who has thousands of sales records in Excel. Reading rows is difficult, but in Tableau:

  • 📊 Bar chart → Top products
  • 📈 Line chart → Monthly sales trend
  • 🗺️ Map → City-wise performance

Result: Faster and smarter business decisions.


2️⃣ Tableau Architecture

Tableau connects to data in two main ways:

Connection Type Meaning Use Case
Live Direct connection to database Real-time banking data
Extract Snapshot of data stored locally Student projects, faster performance

3️⃣ Tableau Interface

+----------------------------------+
| Data Pane | Columns | Rows |
|-----------|-----------------------|
| Filters | View |
| Marks | |
+----------------------------------+
| Sheets | Dashboard | Story |
+----------------------------------+

🔑 Important Areas

  • Data Pane: Contains Dimensions and Measures
  • Columns Shelf: Controls horizontal axis (X-axis)
  • Rows Shelf: Controls vertical axis (Y-axis)
  • Marks Card: Controls color, size, label, tooltip

4️⃣ Dimensions vs Measures

Feature Dimension Measure
Meaning Qualitative (text/category) Quantitative (numbers)
Example City, Category Sales, Profit
Purpose Grouping Calculation
Memory Trick:
Dimension → Describe
Measure → Calculate

5️⃣ Types of Charts in Tableau

  • Bar Chart: Best for comparison (Top products)
  • Line Chart: Best for trends (Monthly sales)
  • Pie Chart: Best for percentage share
  • Map: Best for geographical analysis
  • Tree Map: Best for hierarchical data

6️⃣ Filters in Tableau

Filters help display only required data.

Filter Type Purpose
Extract Filter Before data load
Data Source Filter At source level
Context Filter Creates subset
Dimension Filter Filters categories
Measure Filter Filters numbers

7️⃣ Calculated Fields

Calculated fields allow us to create custom formulas.

Profit Ratio = SUM(Profit) / SUM(Sales)

Use Case: Finance team calculates profit margin.


8️⃣ Dashboard in Tableau

A dashboard is a collection of multiple visualizations in one screen.

+--------------------------------------+ | KPI Cards | +------------------+-------------------+ | Sales Trend | Region Map | +------------------+-------------------+ | Category Bar Chart | +--------------------------------------+

🎯 Why Dashboards Matter

  • Decision makers see summary
  • Interactive analysis
  • Professional reporting

9️⃣ Dashboard Actions

  • Filter Action: One chart filters another
  • Highlight Action: Highlights selected data
  • URL Action: Opens webpage
Real Example:
Click West region → entire dashboard updates automatically.

🔟 Best Practices

  • ✅ Keep dashboard clean
  • ✅ Use limited colors
  • ✅ Highlight KPIs
  • ✅ Avoid too many pie charts
  • ✅ Maintain consistency

🎓 Practice Assignment

Task for Students:

  1. Create KPI cards
  2. Build monthly sales trend
  3. Show top 10 products
  4. Create region map
  5. Add one filter action
  6. Create one calculated field
🚀 End of Detailed Tableau Notes

Chapter = 6 Mastering Mathematical Functions in DAX

DAX Functions Explained – Complete Handbook

Aggregation Functions in DAX

Function Definition Syntax Example
SUM Adds all numbers in a single column. SUM(<Column>) Total Sales = SUM(Sales[Amount])
{100,200,300} → 600
SUMX Calculates expression for each row, then sums. SUMX(<Table>, <Expression>) Total Revenue = SUMX(Sales, Sales[Quantity] * Sales[Price])
AVERAGE Returns mean of numeric column. AVERAGE(<Column>) Avg Sale = AVERAGE(Sales[Amount])
{100,200,300} → 200
AVERAGEX Average from row-by-row expression. AVERAGEX(<Table>, <Expression>) Avg Order Value = AVERAGEX(Sales, Sales[Quantity] * Sales[Price])
MIN Smallest value in a column. MIN(<Column>) Lowest Sale = MIN(Sales[Amount])
MINX Minimum of custom expression. MINX(<Table>, <Expression>) Lowest Order Value = MINX(Sales, Sales[Quantity] * Sales[Price])
MAX Largest value in a column. MAX(<Column>) Highest Sale = MAX(Sales[Amount])
MAXX Maximum of custom expression. MAXX(<Table>, <Expression>) Highest Order Value = MAXX(Sales, Sales[Quantity] * Sales[Price])

Logical Functions in DAX

Function Definition Syntax Example
IF Creates conditional logic. IF(<LogicalTest>, <True>, <False>) Profit Status = IF(Sales[Profit] > 0, "Profit", "Loss")
SWITCH Simplifies multiple IF conditions. SWITCH(<Expression>, <Value>, <Result>, …) Grade = SWITCH(TRUE(), Marks>=90,"A", Marks>=75,"B", Marks>=50,"C","Fail")
AND TRUE if both conditions are true. AND(<Logical1>, <Logical2>) HighValueSale = IF(AND(Sales[Amount]>1000, Sales[Quantity]>5),"Yes","No")
OR TRUE if at least one condition is true. OR(<Logical1>, <Logical2>) SpecialOffer = IF(OR(Sales[Discount]>0, Sales[Coupon]=TRUE),"Yes","No")
NOT Returns opposite of logical test. NOT(<Logical>) NoDiscount = IF(NOT(Sales[Discount]>0),"No Discount","Discount Given")

Text Functions in DAX

Function Definition Syntax Example
LEN Number of characters in text. LEN(<Text>) LEN(Customer[Name]) → "Aditya" = 6
LEFT Extracts characters from left. LEFT(<Text>, <NumChars>) LEFT(Customer[Phone],3)
RIGHT Extracts characters from right. RIGHT(<Text>, <NumChars>) RIGHT(Customer[Phone],4)
MID Extracts substring from position. MID(<Text>, <Start>, <NumChars>) MID(Customer[Code],2,3) → "X12345" = "123"
TRIM Removes extra spaces. TRIM(<Text>) TRIM(Customer[Name])
UPPER Converts to uppercase. UPPER(<Text>) UPPER(Customer[Name])
LOWER Converts to lowercase. LOWER(<Text>) LOWER(Customer[Name])
PROPER Converts to Proper Case. PROPER(<Text>) PROPER(Customer[Name]) → "john smith" = "John Smith"

Wednesday, February 18, 2026

Chapter 5: The Language of DAX — Syntax and Rules Explained

 

Why DAX Is Important in Power BI

Turning basic reports into intelligent business insights

Power BI Without DAX = Basic Reports Only

When you first load data into Power BI, you can:

  • Create simple visuals
  • Drag and drop fields
  • View totals, averages, and counts

But for real business analysis, DAX is essential.

Real Needs in Business Reporting

Business Question Requires DAX?
Growth compared to last year Yes
Top 5 products by profit Yes
Customers with more than 3 purchases Yes
Target vs Achievement analysis Yes

What DAX Adds to Power BI

Without DAX With DAX
Static totals Dynamic, filter-aware results
Basic visuals KPIs, YoY growth, rankings
Raw data view Business logic & intelligence

Where Is DAX Used in Power BI?

DAX Type Purpose Examples
Calculated Columns Row-wise logic Profit Margin, Category
Measures Dynamic aggregations Total Sales, YoY Growth
Calculated Tables Custom data sets Top 5 Products

KPIs in Power BI

A Key Performance Indicator (KPI) shows whether a business goal is met, missed, or exceeded.

Scenario KPI Example
Sales Team Monthly Target Achievement %
E-commerce Conversion Rate
Logistics On-time Delivery %

DAX is the brain of Power BI — turning data into decisions.

Friday, January 30, 2026

Chapter 4: An Introduction to Data Analysis Expressions (DAX)

  Understanding the Basics of DAX



What is DAX?

DAX stands for Data Analysis Expressions. It is a formula language used in Power BI to create new insights from existing data.

DAX is to Power BI what formulas are to Excel.

Excel Formula:
=IF(A1 > 10, "Yes", "No")

DAX Formula:
= IF([Sales] > 10000, "Yes", "No")

Both perform similar logic, but DAX works on entire tables, not individual cells.

Where is DAX Used in Power BI?

Use Case What You Create Example
New field in table Calculated Column Mark product as High or Low
Summary value Measure Total Sales, Avg Profit
Custom table Calculated Table Top 5 Products


Why Do We Need DAX?

Power BI by default shows basic aggregations like sums, counts, and averages. However, real business analysis needs advanced logic.

  • Show sales where profit margin is over 30%
  • Group customers into Gold, Silver, Bronze
  • Compare current month sales with last year

This is where DAX becomes essential.

Real-World Example

Customer Sales Target
A 8000 10000
B 12000 10000

DAX Formula:

Target Met = IF([Sales] >= [Target], "Yes", "No")

Customer Target Met
A No
B Yes


What is a KPI in Power BI?

KPI (Key Performance Indicator) measures how well a goal or target is achieved.

DAX KPI Example:
KPI_Sales_Achievement = DIVIDE([Total Sales], [Sales Target])

KPIs provide quick insights using visuals like indicators, targets, and trend arrows.

DAX Is the Brain of Power BI

  • Adds intelligence to reports
  • Implements business logic
  • Works with filters, slicers, and relationships
  • Enables KPIs, comparisons, and advanced analytics

Friday, January 23, 2026

Chapter 3: Data Modeling & Relationships in Power BI

 Data Modeling in Power BI: Tables, Keys, Relationships



What is Data Modeling in Power BI?

Data Modeling in Power BI is the process of organizing multiple datasets and creating relationships between them so that data can be analyzed accurately and efficiently.

In real-world business scenarios, data does not exist in a single table. Instead, it is distributed across multiple tables such as Sales, Customers, Products, and Date tables.

Why Data Modeling is Important

Proper data modeling ensures that Power BI produces correct calculations, improves report performance, and enables advanced DAX formulas.

Benefit Explanation
Accurate Calculations Ensures totals and measures are correct
Better Performance Optimized models load faster


What is a Relationship?

A relationship is a logical connection between two tables using a common column. This allows Power BI to understand how data from different tables is related.

Example

Sales[CustomerID] connected with Customers[CustomerID]

Types of Relationships in Power BI

Relationship Type Description
One-to-Many (1:*) One record relates to many records (most common)
Many-to-One (*:1) Multiple records connect to one record
One-to-One (1:1) Each record matches exactly one record
Many-to-Many (*:*) Multiple records connect on both sides


Primary Key and Foreign Key

A Primary Key uniquely identifies each record in a table, while a Foreign Key references the primary key of another table to create a relationship.

How to Create Relationships

Relationships can be created automatically by Power BI or manually using Model View or the Manage Relationships option.

Cross Filter Direction

Cross filter direction defines how filters move between related tables. Single direction is recommended for better performance, while both direction is used in complex scenarios.

Star Schema (Best Practice)

Star schema is a widely used data modeling approach where a central fact table is connected to multiple dimension tables.

Fact Table vs Dimension Table

Fact Table Dimension Table
Contains numeric data Contains descriptive data
Used for calculations Used for filtering

Best Practices

Always use one-to-many relationships, follow star schema design, ensure correct data types, and avoid unnecessary many-to-many relationships.

Chapter Summary

Chapter 5 builds the foundation for advanced Power BI concepts. A strong data model ensures accurate analysis and prepares students for DAX calculations.

Chapter 2: Power Query Basics (Data Transformation)

 Power Query Basics: Data Transformation Made Easy



Power Query is one of the most important components of Power BI. It is used to clean, transform, and prepare raw data before it is loaded into the Power BI data model.

In real-world business scenarios, data is rarely clean. Power Query helps convert unstructured and inconsistent data into a clean, reliable, and analysis-ready format.


4.1 What is Power Query?

Power Query is a data preparation tool that follows the ETL process:

ETL Stage Explanation
Extract Collecting data from sources like Excel, CSV, databases, or web
Transform Cleaning, filtering, reshaping, and modifying the data
Load Loading transformed data into Power BI

4.2 Opening Power Query Editor

Steps to open Power Query Editor:

  1. Open Power BI Desktop
  2. Go to Home → Transform Data
  3. Power Query Editor window will open

Power Query Editor works separately from the report view and focuses only on data cleaning and preparation.


4.3 Power Query Editor Interface

Section Purpose
Ribbon Contains transformation tools such as Remove Rows, Split Column, Merge Queries
Queries Pane Displays all tables (queries) loaded into Power BI
Data Preview Shows a preview of the dataset
Query Settings Shows properties and applied transformation steps

4.4 Applied Steps (Very Important)

Applied Steps record every transformation performed on the data. Each step is executed in sequence and can be edited or deleted.

  • Steps run from top to bottom
  • Power Query is non-destructive
  • Original source data remains unchanged

4.5 Common Data Cleaning Operations

Operation Description
Remove Columns Deletes unnecessary columns to improve performance
Remove Rows Removes blank, top, or unwanted rows
Change Data Type Ensures correct interpretation of data
Filter Rows Keeps only relevant records

4.6 Close & Apply

After completing all transformations, click Close & Apply. Power BI applies all steps and loads the cleaned data into the data model.

Clean data leads to accurate analysis, faster reports, and better DAX performance.

Thursday, December 25, 2025

Chapter 1: Power BI – What It Is and How It Works

Chapter 1: Introduction to Power BI




1. What is Power BI?

Power BI is a business analytics tool created by Microsoft. It helps you connect to data, clean it, analyze it, and create interactive reports and dashboards. Power BI turns raw data into meaningful insights.

2. Why Do We Use Power BI?

  • To visualize data in the form of charts, tables, and dashboards.
  • To make data-driven decisions.
  • To combine data from multiple sources like Excel, SQL, web data, etc.
  • To share reports with teams or clients easily.
  • To refresh dashboards automatically.

3. Components / Parts of Power BI

Power BI has 3 main components:

a) Power BI Desktop

A Windows application used to build reports. You can connect to data, clean data using Power Query, create visuals, and write DAX formulas here.

b) Power BI Service (Online)

A cloud-based platform where you publish reports, create dashboards, share reports, and schedule automatic refresh.

c) Power BI Mobile App

Used to view dashboards and reports on mobile devices.

4. Power BI Workflow (How Power BI Works)

Power BI follows this simple process:

  1. Get Data – Import data from Excel, SQL Server, Web, etc.
  2. Transform Data – Clean, remove duplicates, merge tables using Power Query.
  3. Model Data – Create relationships between tables.
  4. Create Visuals – Charts, maps, KPI cards, tables.
  5. Publish Report – Upload to Power BI Service.
  6. Share Dashboard – Share with others for decision-making.

5. Power BI File Types

  • .pbix – Report file created in Power BI Desktop.
  • .pbit – Template file (structure without data).

6. Power BI Key Features

  • Connects to multiple data sources.
  • Provides built-in visuals and custom visuals.
  • Supports DAX for advanced calculations.
  • Automatic data refresh in Power BI Service.
  • Interactive dashboards (filters, slicers, drill-down).

7. Commonly Used Power BI Terms

a) Dataset

The collection of data that you import or connect to in Power BI.

b) Report

A collection of visuals (charts, tables) based on a dataset. A report can have multiple pages.

c) Dashboard

A single-page summary containing visuals pinned from reports.

d) Visualization

A chart, graph, or table that displays your data visually (bar chart, line chart, card, etc.)

e) Data Model

The structure of your tables and their relationships.

8. Example to Understand Power BI

Suppose you have sales data in an Excel file. You import the file into Power BI Desktop, remove empty rows, create a relationship between Sales and Products tables, and build visuals like Sales by Region. Then you publish the report to Power BI Service to share with your team.

9. Summary

Power BI is a complete data analytics tool used to connect, clean, analyze, visualize, and share data. It is simple to learn, powerful for business intelligence, and helpful for decision-making.

Power BI Practical Assignments (Without Lookup Functions)

Assignment 1: Sales Dashboard

Dataset: Sales Table and Product Table

  • Import Sales and Product tables.
  • Clean data: remove duplicates and blank rows.
  • Create relationship between tables.
  • Create visuals: Sales by Category, Sales by Region, Monthly Sales, Top 5 Products.
  • Create DAX: Total Sales, Total Quantity, Sales Growth Percentage.
  • Create and publish a one-page dashboard.

Assignment 2: HR Employee Performance Report

Dataset: Employee Table and Attendance Table

  • Load both datasets into Power BI Desktop.
  • Clean Attendance table and format date column.
  • Create DAX: Total Present Days, Attendance Percentage.
  • Create visuals: Attendance % by Department, Age Distribution.
  • Create slicers for Department and Employee Type.
  • Use conditional formatting to highlight attendance below 70%.

Assignment 3: E-commerce Dashboard

Dataset: Orders, Customers, Products

  • Create relationships using CustomerID and ProductID.
  • Create DAX: Total Revenue, Total Orders, Average Order Value.
  • Create visuals: Revenue by Month, Orders by City, Customer Segmentation.
  • Insert Date slicer and create KPI cards.

Assignment 4: Financial Statement Analysis

Dataset: Profit & Loss Excel Sheet

  • Import P&L sheet and unpivot monthly columns.
  • Create visuals: Expense Breakdown, Income vs Expense.
  • Create DAX: Net Profit = Income - Expense.
  • Apply conditional formatting for negative values.

Assignment 5: Power Query Data Cleaning

Dataset: Raw Excel File

  • Remove duplicate rows.
  • Replace errors in dataset.
  • Split Full Name into First Name and Last Name.
  • Merge Orders and Returns tables.
  • Create a custom column: Profit = Sales - Cost.

Assignment 6: School/College Dashboard

Dataset: Students Table

  • Calculate Total Marks and Percentage using DAX.
  • Create visuals: Marks by Subject, Average Marks by Class, Attendance Trend.
  • Enable drill-down for Class → Student.

Assignment 7: Hospital Data Analysis

Dataset: Patients Table and Doctors Table

  • Import data tables and create relationships.
  • Create visuals: Patient Count by Disease, Age Distribution, Doctor-wise Patients.

Assignment 8: Inventory Management Dashboard

Dataset: Stock and Sales Tables

  • Create new column: Current Stock = Opening Stock - Sold Quantity.
  • Create Stock Alert Column (Stock < 10 = "Low").
  • Create visuals: Low Stock Items, Stock vs Sales.

Assignment 9: Power BI Time Intelligence Practice

Dataset: Sales Table with Date Column

  • Create a Date Table.
  • Create DAX: YTD Sales, MTD Sales, Previous Year Sales.
  • Create visuals comparing current vs previous year.

Assignment 10: Power BI Copilot Tasks

  • Ask Copilot to write DAX for Year-to-Date Sales.
  • Create a line chart for Monthly Sales using Copilot.
  • Ask Copilot to create a summary of the dataset.
  • Ask Copilot to generate a Profit Margin measure.
  • Compare Copilot's DAX formulas with your own formulas.