Lab 5 Data Analysis Expressions
Lab 5 Data Analysis Expressions
Dr Huan Vu
Business AI Lab
1
Faculty of Data Science and Artificial Intelligence, NEU
Prerequisites
To be able to complete this Lab, you should have finished Lab 2, 3 and 4. You should have imported all
related data to the Adventure Works project and built a data model based on them.
Submission Instructions
Each group must complete Lab 2,3,4,5 and return one .pbix file named student1 student2.pbix.
This file should be returned on Wednesday 14/05/2025 at 23h59 GMT+7 via the NEU e-learning
platform.
If you finish this lab as a group of 2, only one submission from a student is enough.
Objectives
Finish the following measures and organize all measures properly.
IMPORTANT: All measures must be organized in a measure table!!!
@BAI Lab 2
Faculty of Data Science and Artificial Intelligence, NEU
2 Text Functions
Text functions in DAX is very similar to EXCEL. Text functions include: LEN, CONCATENATE,
UPPER/LOWER, LEFT/RIGHT/MID, SUBSTITUTE, SEARCH.
1. Use the Calendar Lookup table, create a new calculated column Month Short that extracts
and capitalize the first 3 characters of the month name (e.g. JAN, FEB, MAR, ...).
2. Use the Product Lookup table, recreate the SKU Category column using DAX. The column
extracts every characters before the first ’-’ in the product SKU.
1. Use the Calendar Lookup table, create a new calculated column Weekend. The value of this
column is:
1. Create a new measure called Bulk Orders, which is the same as the Total Orders measure, but
this time only counts orders with quantity > 1
2. Create a new measure that computes Weekend Sales, and Weekday Sales, which is the total
orders on Weekend and Weekday respectively
3. Create a new measure named Bike Returns to calculate the total quantity of bikes returned
@BAI Lab 3
Faculty of Data Science and Artificial Intelligence, NEU
4. Create a matrix to show Bike Returns (values) by Start of Month (rows). What do you notice
about the volume of bike returns over time?
5. Create a new measure named Bike Sales to calculate the total quantity of bikes sold, and add it
to the matrix. What do you notice?
6. Create a new measure named Bike Return Rate using either CALCULATE or DIVIDE, and
add it to the matrix
1. Create a new measure named All Returns to calculate the total number of returns, regardless of
filter context
2. Create a new measure named % of All Returns that divides Total Returns by All Returns
@BAI Lab 4