Ex 8
Ex 8
2. Connect, combine, and transform new sources (Hint: New Source -> Folder
-> Targets -> Combine & Transform Data)
1
3. Employee query: Remove null values or empty strings in Parent Employee
Key column.
2
6. Target query:
Add new column “Months” to get this:
3
Just keep three columns like this:
According to business rules, it’s all right to divide the yearly target evenly
across months for years. So, calculate Target Excluding Tax to get this:
7. Append queries:
Append the Targets for 2020 (second) and Targets (first) queries.
Append queries
Transform the Start of Month to End of Month.
8. Merge queries:
Merge the City (first) and State Province (second) queries with State
Province Key -> Select the State Province and Sales Territory check boxes
-> Rename the State Province.1 column to State Province -> Remove the
State Province Key column. City query or result looks like:
4
9. Disable load for State province and Targets for 2020 queries.
10.Create data model with the following relationships:
From: Data Table
To: Lookup Table (Column)
(Column)
Sale (City Key) City (City Key)
Sale (Customer Key) Customer (Customer Key)
Sale (Salesperson
Employee (Employee Key)
Key)
Sale (Stock Item Key) Stock Item (Stock Item Key)
Sale (Invoice Date
Date (Date)
Key)
Sale (Deliver Date
Date (Date) -> inactive
Key)
Targets (Buying Customer (Buying Group) -> many-to-many
Group) relationship, single (Customer filter Targets)
Targets (End of
Date (Date)
Month)
5
11.Cloning tables: Creates a table called Invoice Date by copying the Date
table.
12.Calculate average profit per employee (name Profit average per
Employee). (Hint: use Quick measure button)
13.Calculate total cost in a calculated column (name Total Cost) in the Sale
table.
14.Add a calculated column (name Unit Price Difference) to the Sale table to
calculate the price difference between the standard unit price and the
price a product was sold.
15.Add a calculated column (name Sale Rows) to the Customer table to count
the number of related rows in the Sale table for each customer. (Hint: use
RELATEDTABLE function)
16.Add a measure (name Total Profit) to compute the total profit.
17.Add a measure (name Total Sales Excluding Tax) to compute total sales
excluding tax.
18.Add a measure (name Profit %) to compute the profit margin percentage.
19.Add a measure (name Total Dry Items Units Sold) to compute total dry
items was sold. Note that you need to avoid showing zeros in your visuals.
(Hint: use operator <>)
20.Use Calculate measure to add a measure (name New England Profit) to
calculate profit for the New England sales territory.
21.Use Calculate measure to add a measure (name New England, Far West,
and Plains Profit) to calculate profit for New England, Far West, and Plains.
22.Use Calculate measure to add a measure (name New England Profit 2020)
to calculate profit in New England in 2020.
23.Use Calculate measure to add a measure (name Profit All Sales Territories)
to calculate profit for all sales territories regardless of any filters on the
City[Sales Territory] column.
24.Create the following figures, each group of figures in one page:
6
7
8
9
10
11
12
• Hint:
• West: Far West, Plains, and Rocky Mountain
• East: Great Lakes, Mideast, and New England
• South: Southeast, Southwest
• North: the others
13
14
25.To reduce the load on the production environment, you connect to the
development database and develop your reports. Once you publish your
report, you need to use the production data instead. Because you’re
developing your model iteratively, you need to switch between the
environments back and forth. How can you minimize the time spent on
changing data sources? The solution must allow for switching the source in
the Power BI service.
A. Create a parameter for database location and use it in queries.
B. Change the data source in the Data Source settings.
C. Change the data source in the Source step in each query.
26.You get data from a table in an Azure SQL Database that contains
hundreds of millions of rows. Loading the full table takes half an hour. You
would like to load a sample of 1,000 rows from the table. How can you
achieve this? Your solution must minimize time spent on loading data.
A. Use a report-level filter.
B. Keep top rows.
C. Provide your own SQL statement that has a TOP clause.
27.You get data from a CSV file with over 10,000 rows. You need to ensure
one of the columns does not contain any missing values. Which Power
Query features should you use?
A. Column distribution
B. Column quality
C. Column profiling based on top 1,000 rows
D. Column profiling based on the entire dataset
28.You are the only developer of Power BI reports in Contoso, and you’re
creating the first sales report. Your report must show data no later than 10
minutes from its arrival in the production environment. Which connectivity
mode suits best? Your solution must minimize the resources spent.
15
A. Import mode
B. Live Connection
C. DirectQuery
29.You need to combine the Customer and City tables, both of which have
the CityKey column. Each row in the output table must contain a customer
name and their city. Which Power Query feature should you use?
A. Group by
B. Merge
C. Transpose
D. Append
30.After you load data from an Excel file, you encounter the error shown in
figure below:
Which Power Query feature can you use to resolve the error? Your solution
must retain all data from Excel.
A. Replace errors
B. Remove rows
C. Change type (add new step)
D. Change type (replace current)
31.A data model has a fact table that has over 15 million rows. There is a
date/time column called DateTime, which contains both date and time.
You need to reduce the size of the data model. Your solution must
preserve as much of the original data as possible. Which solution should
you implement?
A. Change the data type of the DateTime column to Text.
B. Clean the DateTime column.
C. Split the DateTime column into two separate columns: one column that
contains dates, and one column that contains the time portion.
D. Change the data type of the DateTime column to date.
32.You create a visual that is supposed to show revenue by year. You use the
Year column from the Calendar table and the Revenue measure from the
Sale table. The formula of the Revenue measure is as follows:
Revenue = SUM(Sale[Total Including Tax])
16
After checking data, you can see that in 2019, revenue was $50 million.
How can you fix the visual? The solution must use minimum amount of
DAX and ensure that the Calendar table can be used with other fact
tables. The solution must also take into account that you may be
interested in analyzing other measures based on the Sale table.
A. Use the TREATAS function in DAX.
B. Create a relationship between the Calendar and the Sale tables.
C. Merge the Sale and Calendar tables.
D. Create a calculated table that calculates revenue for each year.
33.Your Date table currently consists only of one column called Date, which
contains dates. You need to add a column to the Date table that shows
month and year in the MMMM YYYY format, such as May 2021. What
should you do? Your solution must require the minimum amount of effort
and storage, and the solution must ensure that the values are sorted
chronologically.
A. Create a calculated column that uses the FORMAT function.
B. Create a calculated column that uses the EOMONTH function format as
MMMM YYYY.
C. Duplicate the Date column and apply a custom format string.
D. Create a new calculated table called “Date – MMMM YYYY” and format
as MMMM YYYY
34.You need to write a measure that calculates the monthly balance. Which
formula should you use?
A. CALCULATE(SUM(Inventory[Balance]), ENDOFMONTH('Date'[Date]))
B. CALCULATE(SUM(Inventory[Balance]), MAX(Inventory[Date]))
C. CALCULATE(SUM(Inventory[Balance]), DATESMTD(Inventory[Date]))
D. CALCULATE(MAX(Inventory[Balance]), LASTDATE(Inventory[Date]))
35.You inherit a Power BI data model that contains several tables, one of
which has many calculated columns that all use the RELATED function.
You would like to reduce the size of the model. What should you do?
17
A. Append tables.
B. Merge tables.
C. Separate tables into several data models.
D. Hide unused columns.
36.Your department wants to see a single visual that explains the factors that
contribute to revenue growth the most. Which visualization should you
use?
A. Decomposition tree
B. Funnel chart
C. Key influencers
D. Stacked column chart
37.You’d like to create a navigation page in your report that will take users to
different pages depending on their choice. Your solution must involve
minimal effort, and you must be able to test it in Power BI Desktop. Which
element(s) should you use?
A. Buttons with the Bookmark action
B. Buttons with the Page navigation action
C. Table
D. Text box with hyperlinks
38.You need to ensure that users can effectively navigate your reports by
using the keyboard. Which property should you configure?
A. Bookmarks
B. Layer order
C. Mobile layout
D. Tab order
39.Your colleague already designed a report page that includes two visuals: a
bar chart showing sales by client, and a column chart showing sales by
product category. You need to ensure that whenever a user selects a
client or product category, the other chart shows only the corresponding
sales without showing overall sales. How should you configure
interactions?
A. Filter
B. Highlight
C. None
40.You’ve created a bar chart that shows sales by client. You want users to
see profit figures when they hover over a client. Which options would work
in this case? Each answer presents a complete solution.
18
A. Add Profit as a visual-level filter.
B. Add Profit to drill-through fields.
C. Add Profit to tooltips.
D. Create a report page that shows Profit and add it as a tooltip.
41.You need to create a bar chart that shows the 10 products that generate
the most revenue. Which action should you take? Your solution must
involve minimal effort and consider that users may apply date filters.
A. In the Product table, create a calculated column called IsTop10 that
uses the RANKX function; then use the column in a visual-level filter.
B. Create a calculated table called Top 10 Products that filters the Sales
table.
C. Set a Top N visual-level filter.
D. Create a measure that uses the TOPN function.
42.You need to group the Brand values into Brand Group, which is not
available in the model. How would you group the Brand values? Your
solution must require minimal effort to maintain.
A. Create a data group of type List.
B. Create a data group of type Bin.
C. Create a calculated column in DAX.
D. Create a custom column in Power Query.
43.You have built a line chart that shows revenue by month. You need to
show mean monthly revenue on the same visual. How should you add the
value to the visual? Your solution must consider that users may apply
product filters and involve minimal effort.
A. Create a measure that uses the AVERAGEX function.
B. Add an Average line from the Analytics pane.
C. Add a Median line from the Analytics pane.
D. Create a calculated column in the Product table that uses the
AVERAGEX function.
19