The Indian Premier League (IPL) is more than just a cricket tournament—it’s a goldmine of data, trends, and performance insights. From nail-biting finishes to record-breaking seasons, the IPL has delivered unforgettable moments since 2008. To transform this rich history into meaningful visual insights, Ankit Srivastava, Lead Trainer at Slidescope, has created a powerful and interactive Power BI dashboard titled:
“IPL 2008 – 2025 Season Wise Highlights – Part 1”
This tutorial is designed to help data enthusiasts, Power BI learners, and sports analytics fans understand how real-world sports data can be modeled and visualized effectively.
Get the Dataset here: https://www.kaggle.com/datasets/slidescope/ipl-seasons-2008-to-2025-dataset/data?select=all_ball_by_ball_data.csv
📊 What This Power BI Dashboard Covers
This dashboard delivers a season-wise analytical overview of IPL from 2008 to 2025, focusing on key performance indicators and match-level trends. Some of the major insights include:
✅ Matches Played Per Season
A horizontal bar chart highlights how the total number of matches has varied across different IPL seasons—from shorter seasons to high-volume editions like 2013, 2022, and 2023.
✅ Season-Wise Match Winners
This table clearly showcases:
- IPL season
- Final match winner
- Champion team name
It instantly reveals the dominance of teams like Chennai Super Kings, Mumbai Indians, and Kolkata Knight Riders.
✅ 4s and 6s by Season
A comparative bar chart tracks the explosive growth in boundary-hitting over the years, highlighting:
- Rise in aggressive batting
- Impact of rule changes and pitch conditions
- Evolution of T20 gameplay
✅ Total Runs Scored Per Season
A dedicated visual breaks down the sum of total runs by each season, showing how scoring rates have steadily increased over the years.
📍 KPI Cards at a Glance
The dashboard also features smart KPI cards for quick summary insights:
- 🔹 46.37K Overs Bowled
- 🔹 278K Total Balls Delivered
- 🔹 18 IPL Seasons Covered
- 🔹 1169 Total Matches Analyzed
These figures make it clear just how massive the IPL dataset truly is.
🧠 Learning Outcomes from This Tutorial
With this tutorial, learners can understand:
- ✅ How to build season-wise aggregation models
- ✅ Handling multiple relationships in Power BI
- ✅ Creating Winner & Losing Team columns using DAX
- ✅ Using conditional logic for match outcomes
- ✅ Structuring sports analytics dashboards
- ✅ Designing high-impact KPI visualizations
This project is especially useful for:
- Power BI beginners
- Data analytics students
- Sports analytics professionals
- Dashboard designers
Below is a precise, step-by-step Power BI tutorial in points that walks you from opening Power BI Desktop through loading the five CSVs, building a correct model, and creating the key calculated columns and measures (with exact DAX). Use the file names you showed: all_ball_by_ball_data.csv, all_ipl_matches_data.csv, all_players-data-updated.csv, all_team_aliases.csv, all_teams_data.csv. If a column name in your files differs slightly, substitute the exact name in the DAX shown.
1. Opening Power BI Desktop
- Launch Power BI Desktop.
- Create a new file (File → New) or open your project file if you already started.
- Save the file immediately (File → Save As) and choose a project folder so you don’t lose changes.
2. Loading the five tables (Get Data → CSV)
- In Home ribbon click Get data → Text/CSV.
- Load each CSV one by one in this order:
all_teams_data.csv→ table name:all_teams_dataall_team_aliases.csv→ table name:all_team_aliasesall_players-data-updated.csv→ table name:all_players_dataall_ipl_matches_data.csv→ table name:all_ipl_matches_dataall_ball_by_ball_data.csv→ table name:all_ball_by_ball_data
- For each CSV, click Transform Data (Power Query editor) before loading so you can sanitize types and names.
3. Power Query: basic cleansing and preparation (do this for every table)
- Set data types: Date columns → Date, numeric IDs → Whole Number, text columns → Text.
- Trim / Clean: Select text columns → Transform → Format → Trim and Clean to remove stray spaces.
- Rename columns to consistent names if necessary (e.g.,
team_id,team_name,match_id,team1,team2,match_winner,batsman_runs,is_four,is_six). - Remove duplicate rows where appropriate (Home → Remove Rows → Remove Duplicates).
- Filter out null/blank rows in key columns (filter out rows where
match_idis null). - Unpivot only when necessary—don’t unpivot match or ball-by-ball data.
- Close & Apply to load cleaned tables to the model.
4. Optional: Normalize team names via alias table
- If
all_team_aliasesmaps many variant names to canonicalteam_id:- Merge
all_teams_datawithall_team_aliasesusing team name columns to produce canonicalteam_idandteam_name. - Or in Power Query replace team name column values using
Merge Queries/Left Joinand expand canonical fields.
- Merge
- This ensures team IDs used across matches and ball-by-ball are consistent.
5. Model design and relationships (Model view)
- Open Model view.
- Create these relationships:
all_ipl_matches_data[match_winner]→all_teams_data[team_id]- Cardinality: Many to One (* → 1), Single direction. Set this relationship ACTIVE.
all_ipl_matches_data[team1]→all_teams_data[team_id]andall_ipl_matches_data[team2]→all_teams_data[team_id]- These could be created if you want direct lookups—only one of these can be active with
match_winnerif they share the same key. Usually you keepmatch_winneractive and leave others inactive, but it depends on your model usage.
- These could be created if you want direct lookups—only one of these can be active with
- For the ball-by-ball table:
all_ball_by_ball_data[match_id]→all_ipl_matches_data[match_id](Many→One on matches). This is typically ACTIVE.- If ball data has
batting_team_idorbowling_team_idyou may link toall_teams_data[team_id](as needed).
- Note: Power BI allows only one active relationship between two particular tables on the same pair of keys. Use
USERELATIONSHIP()to activate alternate relationships in DAX.
6. Create the losing-team calculated column (matches table)
- In Data view, select
all_ipl_matches_datathen New column and paste:
LosingTeam =
IF(
all_ipl_matches_data[match_winner] = all_ipl_matches_data[team1],
all_ipl_matches_data[team2],
all_ipl_matches_data[team1]
)
- This creates the losing team ID for each match.
7. Create team name columns (Winner and Loser)
- Winner team name (active relationship to
match_winner):
WinnerTeamName =
RELATED(all_teams_data[team_name])
- Losing team name (requires activating the alternate relationship inside a calculation):
LosingTeamName =
CALCULATE(
SELECTEDVALUE(all_teams_data[team_name]),
USERELATIONSHIP(
all_ipl_matches_data[LosingTeam],
all_teams_data[team_id]
)
)
- If you created
team1orteam2relationships as inactive, similarUSERELATIONSHIP()can be used to pull names forteam1/team2when needed.
8. Flag finals (using a lookup table you created)
- If you created
IPL_Finalstable (DATATABLE or CSV), create a boolean/text column inall_ipl_matches_data:
IsFinal =
IF(
CONTAINS(
IPL_Finals,
IPL_Finals[id], all_ipl_matches_data[match_id]
),
"Final",
"Non-Final"
)
- Or return TRUE/FALSE by removing the IF wrapper and using CONTAINS directly.
9. Core measures (ball-by-ball and match level)
Use measures (not columns) for aggregated KPIs.
- Total Runs (from ball-by-ball):
TotalRuns =
SUM(all_ball_by_ball_data[batsman_runs])
- Total Balls (count deliveries; if ball-by-ball has
ballrows per delivery):
TotalBalls =
COUNTROWS(all_ball_by_ball_data)
- Overs (derived):
TotalOvers =
DIVIDE([TotalBalls], 6)
- Match Count:
MatchesCount =
DISTINCTCOUNT(all_ipl_matches_data[match_id])
- Seasons Count:
SeasonsCount =
DISTINCTCOUNT(all_ipl_matches_data[season])
- Count of 4s and 6s (if
batsman_runsis available):
FoursCount =
COUNTROWS(
FILTER(
all_ball_by_ball_data,
all_ball_by_ball_data[batsman_runs] = 4
)
)
SixesCount =
COUNTROWS(
FILTER(
all_ball_by_ball_data,
all_ball_by_ball_data[batsman_runs] = 6
)
)
If your ball table already includes is_four and is_six flags use SUM(all_ball_by_ball_data[is_four]) and SUM(all_ball_by_ball_data[is_six]).
10. Team-centric measures (wins, win%)
- Team wins (when shown in context of
all_teams_datatable):
TeamWins =
CALCULATE(
COUNTROWS(all_ipl_matches_data),
FILTER(
all_ipl_matches_data,
all_ipl_matches_data[match_winner] = SELECTEDVALUE(all_teams_data[team_id])
)
)
- Team matches played (counts number of times team appears as team1 or team2):
TeamMatchesPlayed =
CALCULATE(
COUNTROWS(all_ipl_matches_data),
FILTER(
all_ipl_matches_data,
all_ipl_matches_data[team1] = SELECTEDVALUE(all_teams_data[team_id])
|| all_ipl_matches_data[team2] = SELECTEDVALUE(all_teams_data[team_id])
)
)
- Win percentage:
TeamWinPercent =
DIVIDE([TeamWins], [TeamMatchesPlayed], 0)
11. Validate the model and test values
- Create simple Table visuals to show
match_id,team1,team2,match_winner,LosingTeam,WinnerTeamName,LosingTeamName. - Cross-check a few known match rows from your CSV to confirm the columns resolve correctly.
- Create a card visual for
MatchesCount,TotalRuns,TotalOversto confirm totals match expectations.
12. Performance & best practices
- Prefer measures for aggregations (faster, flexible).
- Use calculated columns only when you need row-level values (like
LosingTeam). - Avoid overly complex row-by-row iterators; prefer SUMX only when needed.
- Keep data types consistent across relationships (both sides must be same numeric type).
- Document your model: add descriptions to tables and measures.
13. Next steps (visuals and storytelling)
- Build visuals: season bar chart, 4s/6s combo, season-wise total runs, KPI cards (Matches, Balls, Overs, Seasons).
- Use slicers for
seasonandteam_name. - Add tooltips that show measures like
TeamWins,Win%. - Save and publish to Power BI Service if you want to share the dashboard.
This step-by-step guide provides the exact DAX and the recommended modeling pattern for dual foreign keys (winner + loser), ball-by-ball aggregation, and match-level derived columns.
🎯 About the Creator
This IPL dashboard and tutorial has been designed and taught by:
Ankit Srivastava
Lead Trainer at Slidescope
With deep expertise in Power BI, Data Analytics, and Business Intelligence, Ankit focuses on teaching through real-world datasets and practical dashboards, making learning both effective and job-ready.
🚀 What’s Next?
This is Part 1 of the IPL analytics series. The upcoming parts are expected to dive deeper into:
- Team-wise performance
- Player impact analysis
- Toss vs match result trends
- Finals vs non-final performance
- Home vs away dominance
