Categories: DAX
Tags:

Level : Basic ( Beginner Friendly)

Dataset Description and Download link is here: Global-online-course-enrollment-performance-dataset-for-analysis-and-ml-projects/

Here are 10 practical DAX questions with their correct working solutions that you can directly use in Power BI.


✅ 1. What is the Average Quiz Score?

✅ DAX:

Avg Quiz Score = 
AVERAGE(course[Quiz_Score])

✅ 2. What is the Course Completion Rate (%)?

✅ DAX:

Course Completion Rate = 
DIVIDE(
    CALCULATE(COUNT(course[Student_ID]), course[Completion_Status] = "Completed"),
    COUNT(course[Student_ID])
)

✅ 3. What is the Total Video Watch Time (Minutes)?

✅ DAX:

Total Watch Time = 
SUM(course[Video_Watch_Time_Min])

✅ 4. What is the Average Login Frequency per Student?

✅ DAX:

Avg Login Frequency = 
AVERAGE(course[Login_Frequency])

✅ 5. What % of Students are Highly Engaged (Engagement Index ≥ 0.75)?

✅ DAX:

High Engagement % =
DIVIDE(
    CALCULATE(
        COUNT(course[Student_ID]),
        course[Engagement Index (Normalized)] >= 0.75
    ),
    COUNT(course[Student_ID])
)

✅ 6. What is the Average Time Spent Per Session?

✅ DAX:

Avg Time Per Session = 
AVERAGE(course[Time_Spent_Per_Session_Min])

✅ 7. Which Learning Mode Has the Highest Average Quiz Score?

✅ DAX:

Top Learning Mode by Quiz =
MAXX(
    VALUES(course[Learning_Mode]),
    CALCULATE(AVERAGE(course[Quiz_Score]))
)

Top Learning Mode by Avg Quiz Score (Returns Name)

Top Learning Mode by Quiz =
VAR ModeTable =
    ADDCOLUMNS(
        VALUES(course[Learning_Mode]),
        "AvgScore", CALCULATE(AVERAGE(course[Quiz_Score]))
    )

VAR TopMode =
    TOPN(1, ModeTable, [AvgScore], DESC)

RETURN
    CONCATENATEX(TopMode, course[Learning_Mode], ", ")

✅ 8. What is the Dropout Rate (%)?

✅ DAX:

Dropout Rate =
DIVIDE(
    CALCULATE(COUNT(course[Student_ID]), course[Completion_Status] = "Dropped"),
    COUNT(course[Student_ID])
)

✅ 9. What is the Average Assignments Completed by Course Category?

✅ DAX:

Avg Assignments by Course =
AVERAGE(course[Assignments_Completed])

✅ (Use this in a bar chart with Course_Category)


✅ 10. What is the Correlation Between Engagement & Quiz Performance (Proxy KPI)

Since Power BI has no built-in CORREL, use this performance proxy KPI:

✅ DAX:

Engagement vs Quiz Performance =
DIVIDE(
    AVERAGE(course[Quiz_Score]),
    AVERAGE(course[Engagement Index (Normalized)])
)

✅ BONUS (Advanced KPI – At-Risk Students %)

Students with:

  • Engagement Index < 0.5
  • AND Quiz Score < 50
At Risk % =
DIVIDE(
    CALCULATE(
        COUNT(course[Student_ID]),
        course[Engagement Index (Normalized)] < 0.5,
        course[Quiz_Score] < 50
    ),
    COUNT(course[Student_ID])
)

✅ Summary of What You Now Have

You now have:

  • Performance KPIs
  • Engagement KPIs
  • Completion & Dropout KPIs
  • Learning Mode & Course Category KPIs
  • Advanced Risk Detection Logic