0% found this document useful (0 votes)
49 views3 pages

3 Dax

This document outlines an exercise to configure aggregations using DAX in Power BI for Tailwind Traders, focusing on calculating annual, quarterly, and year-to-date profits. It includes step-by-step instructions for creating measures for profit margins, median sales, and utilizing the Performance Analyzer tool to enhance report performance. The exercise aims to help Tailwind Traders generate insights into their financial performance for strategic decision-making.

Uploaded by

Dishank Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views3 pages

3 Dax

This document outlines an exercise to configure aggregations using DAX in Power BI for Tailwind Traders, focusing on calculating annual, quarterly, and year-to-date profits. It includes step-by-step instructions for creating measures for profit margins, median sales, and utilizing the Performance Analyzer tool to enhance report performance. The exercise aims to help Tailwind Traders generate insights into their financial performance for strategic decision-making.

Uploaded by

Dishank Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Exercise: Configure aggregations using

DAX
Introduction
In your experience with Power BI, you've learned to turn data into insights. In this exercise,
you’ll use DAX to calculate annual and quarterly profits and analyze data sets to create a
clear financial story.

By completing this exercise, you’ll demonstrate your ability to:

• Create time-based summaries for displaying quarterly, annual, and year-to-date profit
data.
• Determine median sales volume to assess Tailwind Traders' performance stability.
• Utilize the Performance Analyzer tool to enhance report generation and ensure fast
loading times.

Case study
Tailwind Traders needs to generate insights into its financial performance to inform its
strategic decisions for the upcoming business year. The insights it requires include time-
based summaries that display quarterly and annual profits and year-to-date breakdowns. The
company also requires its median sales volume to assess its financial performance. Let’s help
Tailwind Traders create this report.

Instructions
Locate and open the Tailwind Traders Report.pbix Power BI file you created in the
previous exercise. If you followed the steps from the previous exercise correctly, then your
data model should resemble the one displayed in the screenshot below. Follow the prompts to
configure aggregations for this data model using DAX.
Step 1: Calculate Yearly Profit margin

1. Create a new measure for the Sales in USD table.

2. In the formula bar, create a new column that represents the yearly profit margin. This
margin should be derived by dividing the gross revenue by the total net revenue within the
Sales in USD table.

Step 2: Calculate Quarterly Profit

1. Right-click on the Sales in USD table in the Fields pane and choose New Measure.

2. Create a new measure for quarterly profit. Consider using a function that aggregates data
until the end of the current quarter. To achieve this, you must reference the calculated yearly
profit and a calendar table.

Tip: Consider leveraging the DATESQTD function in DAX to break down yearly data into
quarterly segments.

Step 3: Calculate Year-to-Date Profit

1. Right-click on the Sales in USD table in the Fields pane and select New Measure.

2. Create a new measure for the year-to-date profit. You'll need a function that aggregates
data from the start of the year up to the current date.

Tip: TOTALYTD is a function to aggregate data on a year-to-date basis. Reference the


yearly profit and a calendar table to guide your calculation.

Step 4: Calculate Median Sales


1. Right-click on the Sales in USD table in the Fields pane and choose New Measure.

2. In the formula bar, create a new measure to represent the median sales. Consider the
statistical functions in DAX that can help you find the middle value of gross revenue.

Hint: The median separates the higher and lower half of a data sample. MEDIAN is a DAX
function that can help you derive this directly from your sales data.

Step 5: Access the Performance Analyzer

1. Find and select the Performance Analyzer option within the View tab.

2. Create an empty Card visual and drag the Yearly Profit Margin field to the Fields well.
Repeat this process for the Median Sales, Quarterly Profit, and YTD Profit.

3. Begin recording the performance of the card visuals using the Performance Analyzer’s
recording feature.

4. Refresh your reports to test their performance.

5. Observe the list of all visual items in your report and their respective load times. Ensure
the DAX query time of visual items is < 200ms and note any slow-loading visuals.

6. Select Stop and remove all Card visuals, resulting in a blank Canvas.

Conclusion
You've helped influence Tailwind Traders' strategic decisions by calculating profits and
assessing sales consistency. In the data world, accuracy and speed are key. You’ve also
demonstrated the ability to configure calculations using DAX.

You might also like