PowerBI

Create a School Management Dashboard in Power BI using DAX – Step-by-Step Guide

Power BI Tutorial: Build a School Management Dashboard using DAX

In this tutorial, you will learn how to design a relational database for a school management system and visualize it in Power BI using DAX measures and charts. We will cover data modeling, relationships, and DAX-based KPIs to create an interactive dashboard.

Step 1: Define Your Data Structure

First, create the following tables with around 50 records each. This gives you a healthy dataset to test filters, slicers, and DAX expressions.

  • Schools
  • Cities
  • Teachers
  • Students
  • Fees
  • Salaries

Relational Model (ER Diagram)

Use this relationship structure in Power BI’s model view:


Cities
  ↑
  |
Schools
  ↑            ↑
  |            |
Teachers     Students
  ↑            ↑
  |            |
Salaries      Fees
  

📊 Complete Database Schema for School Management Dashboard

Below is the complete relational schema for a school management dashboard, designed for use in Excel and Power BI. These tables are normalized and connected through keys to support DAX measures and visualizations effectively.

🏙️ 1. Cities Table

  • CityIDInteger (Primary Key)
  • CityNameText
  • StateText
  • CountryText

🏫 2. Schools Table

  • SchoolIDInteger (Primary Key)
  • SchoolNameText
  • CityIDInteger (Foreign Key → Cities)
  • EstablishedYearInteger
  • TypeText (e.g., Public / Private)

👩‍🏫 3. Teachers Table

  • TeacherIDInteger (Primary Key)
  • FullNameText
  • GenderText (M / F)
  • SchoolIDInteger (Foreign Key → Schools)
  • SubjectText
  • JoiningDateDate
  • SalaryDecimal

🎓 4. Students Table

  • StudentIDInteger (Primary Key)
  • FullNameText
  • GenderText (M / F)
  • DOBDate
  • SchoolIDInteger (Foreign Key → Schools)
  • ClassText (e.g., 5th, 10th)
  • EnrollmentYearInteger

💸 5. Fees Table

  • FeeIDInteger (Primary Key)
  • StudentIDInteger (Foreign Key → Students)
  • MonthText (e.g., Jan 2025)
  • AmountDecimal
  • PaidOnDate
  • PaymentModeText (Cash / Online / Card)

💼 6. Salaries Table

  • SalaryIDInteger (Primary Key)
  • TeacherIDInteger (Foreign Key → Teachers)
  • MonthText (e.g., Jan 2025)
  • AmountDecimal
  • PaidOnDate
  • PaymentModeText (Bank / Cash / Cheque)

🔗 Relationship Summary


Cities
  ↑
  |
Schools
  ↑            ↑
  |            |
Teachers     Students
  ↑            ↑
  |            |
Salaries      Fees
  

Each table uses IDs as primary and foreign keys to maintain relational integrity and optimize DAX-based queries in Power BI. These relationships allow you to filter students by city, calculate total fees by school, or average teacher salary by subject.

Step 2: Load Data into Power BI

Export each table to Excel and load it into Power BI using Get Data → Excel. Ensure relationships are properly detected, or manually define them using primary and foreign keys.

Tips:

  • Set proper data types (Date, Text, Number).
  • Use Manage Relationships to fix incorrect or missing links.
  • Mark CityID, SchoolID, StudentID, and TeacherID as unique keys where applicable.

📈 DAX Measures for School Management KPIs in Power BI

After building your data model and connecting tables using relationships, the next step is to create DAX measures that offer powerful insights into your school system. Below are common and advanced KPIs you can calculate using simple DAX formulas.

✅ Total Students

TotalStudents = COUNTROWS(Students)

This measure counts all students across all schools.

✅ Total Fees Collected

TotalFees = SUM(Fees[Amount])

Calculates total fees collected from all students.

✅ Average Teacher Salary

AverageSalary = AVERAGE(Salaries[Amount])

This shows the average salary paid to teachers.

✅ Students by City


StudentsByCity = 
    COUNTROWS(Students)
  

Use a matrix visual and place CityName from the Cities table on rows with this measure in values.

✅ Teachers by City


TeachersByCity = 
    COUNTROWS(Teachers)
  

Create a matrix with CityName from Cities and this measure to find teacher distribution.

✅ Teachers by School


TeachersBySchool = 
    COUNTROWS(Teachers)
  

Use a matrix with SchoolName from Schools and this measure.

✅ Fees Per Student


FeesPerStudent = 
    CALCULATE(
        SUM(Fees[Amount]),
        ALLEXCEPT(Fees, Fees[StudentID])
    )
  

Returns the total fee paid by each student. Use it in a table with StudentID or FullName.

✅ Fees Per School


FeesPerSchool = 
    CALCULATE(
        SUM(Fees[Amount]),
        ALLEXCEPT(Schools, Schools[SchoolID])
    )
  

Use a matrix or bar chart with SchoolName and this measure to compare fee collections across schools.

✅ Fees Per City


FeesPerCity = 
    CALCULATE(
        SUM(Fees[Amount]),
        ALLEXCEPT(Cities, Cities[CityID])
    )
  

Compare total fee revenue across cities.

✅ Total Students Per School


StudentsPerSchool = 
    CALCULATE(
        COUNTROWS(Students),
        ALLEXCEPT(Schools, Schools[SchoolID])
    )
  

Displays number of students in each school. Great for capacity planning visuals.

✅ Monthly Fee Trend


MonthlyFeeTrend = 
    SUM(Fees[Amount])
  

Use this measure with the Month column in a line chart to see monthly collection trends.

✅ Average Fee Per Student


AverageFeePerStudent = 
    DIVIDE(SUM(Fees[Amount]), DISTINCTCOUNT(Fees[StudentID]))
  

This gives you how much on average a student is paying.

✅ Average Salary Per City


AverageSalaryPerCity = 
    AVERAGEX(
        VALUES(Schools[CityID]),
        CALCULATE(AVERAGE(Salaries[Amount]))
    )
  

Calculates average salary distributed to teachers grouped by city.

You can use these DAX measures inside various visuals like bar charts, cards, matrices, and slicers. Combining them allows you to build a dynamic, interactive Power BI dashboard that serves school admins, HR, and accountants alike.

Step 4: Create Visual Dashboard

Use the following visual elements:

  • Bar chart: Students per School
  • Card: Total Teachers
  • Line chart: Monthly Fees Collection
  • Table: Teacher Name + Subject + Salary
  • Slicer: City, Year, Gender

Step 5: Add Filters and Slicers

Add slicers to let users filter the report by:

  • City
  • Enrollment Year
  • Gender (Student or Teacher)

Step 6: Publish and Share

Once your report is ready:

  • Save it as .pbix
  • Click Publish to Power BI Service
  • Share via workspace or publish to web (with caution)

Conclusion

Power BI offers a powerful way to analyze and present school management data. With relational modeling, DAX, and proper visuals, your dashboard can offer insights for school administrators, HR, and finance departments alike.

Leave a Reply

Your email address will not be published. Required fields are marked *