Microsoft DP-500 Practice Test - Questions Answers, Page 4

List of questions
Question 31

You have a Power Bl data model.
You need to refresh the data from the source every 15 minutes.
What should you do first?
You cannot schedule a refresh on 15-minute increments. Only 30, unless using XMLA endpoint.
Question 32

You are configuring a Power Bl report for accessibility as shown in the following table.
You need to change the default colors of all three visuals to make the report more accessible to users who have color vision deficiency. Which two settings should you configure in the Customize theme window? Each correct answer presents part of the solution. NOTE: Each correct selection is worth one point.
Reference: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes
Question 33

You are creating a Python visual in Power Bl Desktop.
You need to retrieve the value of a column named Unit Price from a DataFrame.
How should you reference the Unit Price column in the Python code?
You can retrieve a column in a pandas DataFrame object by using the DataFrame object name, followed by the label of the column name in brackets.
So if the DataFrame object name is dataframe1 and the column we are trying to retrieve the 'X' column, then we retrieve the column using the statement, dataframe1['X'].
Here's a simple Python script that imports pandas and uses a data frame:
import pandas as pd data = [['Alex',10],['Bob',12],['Clarke',13]] df = pd.DataFrame(data,columns=['Name','Age'],dtype=float) print (df)
When run, this script returns:
Name Age
0 Alex 10.0
1 Bob 12.0
2 Clarke 13.0
Reference: http://www.learningaboutelectronics.com/Articles/How-to-retrieve-a-column-from-a-
Question 34

You have a Power Bl report that contains one visual.
You need to provide users with the ability to change the visual type without affecting the view for other users.
What should you do?
Enable personalization in a report
You can enable the feature either in Power BI Desktop or the Power BI service. You can also enable it in embedded reports.
To enable the feature in Power BI Desktop, go to File > Options and settings > Options > Current file > Report settings. Make sure Personalize visuals is turned on.
Question 35

You have a Power Bl report that contains the visual shown in the following exhibit.
You need to make the visual more accessible to users who have color vision deficiency. What should you do?
Themes, contrast and colorblind-friendly colors
You should ensure that your reports have enough contrast between text and any background colors.
Certain color combinations are particularly difficult for users with color vision deficiencies to distinguish. These include the following combinations:
**---> green and black
green and red
green and brown
blue and purple
green and blue
light green and yellow
blue and grey
green and grey
Avoid using these colors together in a chart, or on the same report page.
Reference: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-accessibility-creating-reports
Question 36

You have the following Python code in an Apache Spark notebook.
Which type of chart will the code produce?
The matplotlib.pyplot.fill_between function fills the area between two horizontal curves.
The curves are defined by the points (x, y1) and (x, y2). This creates one or multiple polygons describing the filled area.
Reference: https://matplotlib.org/3.5.0/api/_as_gen/matplotlib.pyplot.fill_between.html
Question 37

You use Azure Synapse Analytics and Apache Spark notebooks to You need to use PySpark to gain access to the visual libraries. Which Python libraries should you use?
Matplotlib
You can render standard plotting libraries, like Matplotlib, using the built-in rendering functions for each library.
Matplotlib is a plotting library for the Python programming language and its numerical mathematics extension NumPy.
Additional libraries
Beyond these libraries, the Azure Synapse Analytics Runtime also includes the following set of libraries that are often used for data visualization:
Seaborn Seaborn is a Python data visualization library based on matplotlib. It provides a high-level interface for drawing attractive and informative statistical graphics.
Reference: https://docs.microsoft.com/en-us/azure/synapse-analytics/spark/apache-spark-datavisualization
https://seaborn.pydata.org/
Question 38

You are using a Python notebook in an Apache Spark pool in Azure Synapse Analytics. You need to present the data distribution statistics from a DataFrame in a tabular view. Which method should you invoke on the DataFrame?
The aggregating statistic can be calculated for multiple columns at the same time with the describe function.
Example:
titanic[["Age", "Fare"]].describe()
Out[6]:
Age Fare
count 714.000000 891.000000
mean 29.699118 32.204208
std 14.526497 49.693429
min 0.420000 0.000000
25% 20.125000 7.910400
50% 28.000000 14.454200
75% 38.000000 31.000000
max 80.000000 512.329200
Reference:
https://pandas.pydata.org/docs/getting_started/intro_tutorials/06_calculate_statistics.html
Question 39

You have a kiosk that displays a Power Bl report page. The report uses a dataset that uses Import storage mode. You need to ensure that the report page updates all the visuals every 30 minutes.
Which two actions should you perform? Each correct answer presents part of the solution. NOTE:
Each correct selection is worth one point.
Automatic page refresh in Power BI enables your active report page to query for new data, at a predefined cadence, for DirectQuery sources.
Automatic page refresh is available for DirectQuery sources and some LiveConnect scenarios, so it will only be available when you are connected to a supported data source. This restriction applies to both automatic page refresh types.
Reference: https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-automatic-pagerefresh
Question 40

You have an Azure Synapse Analytics dedicated SQL pool.
You need to ensure that the SQL pool is scanned by Azure Purview.
What should you do first?
Question