🚀 Learn Power BI in 5 Minutes
Skip the long read.
See the key Power BI concepts in one easy-to-follow infographic.
Dataset Used:
Context:
The "120 Years of Olympic History: Athletes and Results" dataset from Kaggle contains historical Olympic data from Athens 1896 to Rio 2016. The original dataset includes two files: Olympic Events, containing 268,768 records with athlete participation details, and NOC Regions, containing 230 records that map National Olympic Committee (NOC) codes to countries and regions.
In the original Olympic Games, the Summer and Winter Olympics were held in the same year until 1992. From 1994 onwards, the Summer and Winter Games each continued on their own four-year cycle, staggered two years apart (for example, Winter 1994, Summer 1996, Winter 1998, and so on).
Throughout this learning series, we will use the enhanced dataset to explore various Power BI concepts, including data modeling, semantic models, geographical analysis, and report visualizations. We will analyze different aspects of the Olympic Games, such as country performance, athlete performance, medal trends, geographical insights, and the evolution of women's participation over time.
- ID – Unique identification number for each athlete (Integer)
- Name – Name of the athlete (Text)
- Gender – Gender of the athlete (M/F) (Text)
- Age – Age of the athlete (Integer)
- Height – Height of the athlete in centimeters (Integer)
- Weight – Weight of the athlete in kilograms (Decimal Number)
- Team – Name of the team the athlete represented (Text)
- NOC – Three-letter code representing the National Olympic Committee (Text)
- Games – Olympic Games edition (Year and Season) (Text)
- Year – Year in which the Olympic Games were held (Integer)
- Season – Summer or Winter (Text)
- City – Host city of the Olympic Games (Text)
- Sport – Sport category (Text)
- Event – Specific event within the sport (Text)
- Medal – Medal won (Gold, Silver, Bronze, or No Medal) (Text)
- GamesOpeningDate – Official opening ceremony date of the Olympic Games (Date)
- NOC – Three-letter code representing the National Olympic Committee (Text)
- Region – Country or region name (Text)
- Notes – Additional information (Text)
- Continent – Name of the continent (Text)
- MedalsWon – Medal count by region (Integer)
- Region – Name of the region (Text)
- Target – Target medal count for each region (Integer)
- AthleteID – Unique athlete identifier (Integer)
- Name – Athlete name (Text)
- Gender – Gender (M/F) (Text)
- EventID – Unique event identifier (Text)
- Sport – Sport category (Text)
- Event – Specific event name (Text)
- AthleteID – Links to DimAthlete (Integer)
- EventID – Links to DimEvent (Text)
Importing Dataset into Power BI
- Renaming columns and tables
- Removing unnecessary columns
- Filtering rows
- Splitting and merging columns
- Changing data types
- Creating custom columns and calculations
- Combining or appending queries
- Performing many other data transformation operations
Note: Filters applied in Power Query are also transformation steps. When you select Close & Apply, only the rows that meet those filter conditions are loaded. Before loading the data, review your Applied Steps and remove any filters that were used only temporarily while exploring the data.
Data Preparation & Cleaning
For demonstration purposes in this learning series, some missing values may be replaced to simplify later examples.
However, in real-world solutions, you should avoid automatically replacing missing Age, Height, or Weight values with 0 unless zero has a valid business meaning.
For example, replacing an unknown height with 0 can affect calculations such as Average Height and produce misleading results.
Some common data preparation tasks include:
To replace Null values with NA or another appropriate value
Choose a replacement value based on the meaning and data type of the column.
When multiple tables are loaded, Power BI Desktop can attempt to automatically detect relationships based on matching columns and the values within those columns.
In our example, Power BI can identify a relationship between the Olympic Events table and the NOC Region table using the NOC column.
NOC Region (1) → Olympic Events (*)
The NOC Region table contains the lookup information for each NOC, while the Olympic Events table can contain many athlete participation records for the same NOC.
This is a common one-to-many relationship pattern.
Under the option Cross filter direction, we have two options
- Single directional filter
- Bi-directional filter
Single (Single-directional) – In a single-directional relationship, filters flow in only one direction. Filtering one table affects the related table, but not vice versa.
Both (Bi-directional) – In a bi-directional relationship, filters flow in both directions. Filtering either table affects the related table, allowing filters to propagate across the relationship.
Let's create visuals based on the above dataset in further blogs. Get ready!
Download Raw files - Download the sample datasets (ZIP)
Download .pbix files - Download the completed Power BI report (.pbix)
Data Profiling
Power Query includes built-in Data Profiling features that help assess data quality before loading data into the model.
These include:
- Column Quality
- Column Distribution
- Column Profile
These tools help identify null or empty values, errors, duplicate or repeated values, distinct or unique values, unexpected values, and data inconsistencies, making it easier to clean and validate datasets.
By default, Power Query performs column profiling using the first 1,000 rows of the data.
You can change this to profile the entire dataset by selecting the profiling option at the bottom of the Power Query Editor and choosing Column profiling based on entire dataset.
Conclusion
Preparing and organizing your data is the first step toward building meaningful Power BI reports. By importing data, performing transformations in Power Query Editor, creating a well-structured semantic model, and establishing the right relationships, you ensure accurate analysis and better report performance.
Following good modeling practices such as using appropriate data types, understanding relationship cardinality, applying sensible filter directions, and using star-schema principles where appropriate also makes your semantic model easier to understand and maintain.
With the dataset now ready, you're all set to explore the wide range of Power BI visuals in the upcoming lessons and create interactive, insightful dashboards.
| Tags | Power BI |
| Useful links | Semantic models in Power BI - Power BI | Microsoft Learn |
| MS Learn Modules | Configure a Semantic Model in Power BI Desktop - Training | Microsoft Learn |
| Test Your Knowledge |









No comments:
Post a Comment