Docsity

online base de datos completa, Apuntes de Matemáticas

Toggle sidebar
bg1
DAX Interview Questions Answers
Explain what is DAX?
DAX stands for Data Analysis Expressions, and it is the formula language simply it is a
collection of functions, operators, and constants that can be used in a formula, or expression in
Microsoft SQL Server Analysis Services, Power Pivot in Excel, and Power BI Desktop. Stated
more simply, DAX helps you create new information from data already in your model
expressions.
Explain when do you use SUMX() instead of SUM()?
When the expressions to SUM() consits of anything else than a column name. Typically when
you want to add or multiply the values in different columns:
SUMX(Orderline, Orderline[quantity], Orderline[price])
SUMX() first creates a row context over the Sales table (see 1 above). It then iterates through
this table one row at a time. SUM() is optimized for reducing over column segments and is as
such not an iterator.
What do you understand by new CALENDARAUTO() Function in DAX(SSAS)?
CALENDARAUTO function returns a table with a single column named “Date” that contains a
contiguous set of dates. The range of dates is calculated automatically based on data in the
model.
Example: In this example, the MinDate and MaxDate in the data model are July 1, 2010 and
June 30, 2011.
CALENDARAUTO() will return all dates between January 1, 2010 and December 31, 2011.
CALENDARAUTO(3) will actually return all dates between April 1, 2010 and March 31, 2012.
Name any 3 most useful aggregation functions DAX?
DAX has a number of aggregation functions, including the following commonly used functions:
SUM
AVERAGE
MIN
MAX
SUMX (and other X functions)
These functions work only on numeric columns, and generally can aggregate only one column
at a time. However, special aggregation functions that end in X, such as SUMX, can work on
multiple columns. These functions iterate through the table, and evaluate the expression for
each row.
Which are the three places where an expression can be evaluated and hence a specific
context is set?
1. In a pivot table cell. Filter context is set by rows, columns, filters and slicers.
2. In a row cell (calculated column) Row context is set by the row itself.
3. In the measure calculation area of a table. No row, nor filter context is set.
Name any 3 most useful text functions in DAX?
The text functions in DAX include the following:
CONCATENTATE
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe

Vista previa parcial del texto

¡Descarga online base de datos completa y más Apuntes en PDF de Matemáticas solo en Docsity!

DAX Interview Questions Answers Explain what is DAX? DAX stands for Data Analysis Expressions, and it is the formula language simply it is a collection of functions, operators, and constants that can be used in a formula, or expression in Microsoft SQL Server Analysis Services, Power Pivot in Excel, and Power BI Desktop. Stated more simply, DAX helps you create new information from data already in your model expressions. Explain when do you use SUMX() instead of SUM()? When the expressions to SUM() consits of anything else than a column name. Typically when you want to add or multiply the values in different columns: SUMX(Orderline, Orderline[quantity], Orderline[price]) SUMX() first creates a row context over the Sales table (see 1 above). It then iterates through this table one row at a time. SUM() is optimized for reducing over column segments and is as such not an iterator. What do you understand by new CALENDARAUTO() Function in DAX(SSAS)? CALENDARAUTO function returns a table with a single column named “Date” that contains a contiguous set of dates. The range of dates is calculated automatically based on data in the model. Example: In this example, the MinDate and MaxDate in the data model are July 1, 2010 and June 30, 2011. CALENDARAUTO() will return all dates between January 1, 2010 and December 31, 2011. CALENDARAUTO(3) will actually return all dates between April 1, 2010 and March 31, 2012. Name any 3 most useful aggregation functions DAX? DAX has a number of aggregation functions, including the following commonly used functions:  SUM  AVERAGE  MIN  MAX  SUMX (and other X functions) These functions work only on numeric columns, and generally can aggregate only one column at a time. However, special aggregation functions that end in X, such as SUMX, can work on multiple columns. These functions iterate through the table, and evaluate the expression for each row. Which are the three places where an expression can be evaluated and hence a specific context is set?

  1. In a pivot table cell. Filter context is set by rows, columns, filters and slicers.
  2. In a row cell (calculated column) Row context is set by the row itself.
  3. In the measure calculation area of a table. No row, nor filter context is set. Name any 3 most useful text functions in DAX? The text functions in DAX include the following:  CONCATENTATE

 REPLACE

 SEARCH

 UPPER

 FIXED

These text work very similarly to the Excel functions that have the same name, so if you're familiar with how Excel handles text functions, you're already a step ahead. If not, you can always experiment with these functions in Power BI, and learn more about how they behave. How is filter context propagated through relationships? Filter context automatically propagates following the filtering of the relationship. It always propagates from the one side of the relationship to the many side. In addition, you also have the option of enabling the propagation from the many side to the one side. No functions are available to force the propagation: Everything happens inside the engine in an automatic way, according to the definition of relationships in the data model. What are Path() and PathLength() functions in DAX? PATH(): Syntax PATH(<ID_columnName>, <parent_columnName>) Its Returns a delimited text string with the identifiers of all the parents of the current identifier, starting with the oldest and continuing until current. PATHLENGTH(): Syntax PATHLENGTH() Its Returns the number of parents to the specified item in a given PATH result, including self. Example: I think there is no need to explain you can understand it yourself What is the difference between DISTINCT() and VALUES() in DAX? Both count the distinct values, but VALUES() also counts a possible implictit virtual empty row because of non matching values in a child table. This is usually in a dimension table.

Propagation happens manually by using RELATED() and RELATEDTABLE(). These functions need to be used on the correct side of a one-to-many relationship: RELATED() on the many side, RELATEDTABLE() on the one side. How does SUMMARIZECOLUMNS relate to filtering?

  1. SUMMARIZECOLUMNS is not susceptible for outer (external) filters, in contrast to SUMMARIZE
  2. you can add a filter (e.g. using FILTER) as a param of SUMMARIZCOLUMNS and it will filter accordingly. It acts as if you've added a filter in a pivot table. What is the initial filter context? The initial filter context comes from four areas of a pivot table:
  3. Rows
  4. Columns
  5. Filters
  6. Slicers It is the standard filtering coming from a pivot table before any possible modifications from DAX formulas using CALCULATE(). Why don't you use a CALCULATE() in the aggregation expression of a SUMMARIZECOLUMN()? The CALCULATE() is automatically generated. What is the difference between having a measure as a second FILTER param and having the original measure expression as a param. FILTER(table, [MEASURE]) vs FILTER(table, SUM(...))? A measure has always implicit filter context, so the ROW context induced by the FILTER is transferred to filter context in the measure.
    In case of the expression only, no filter context is imposed on the expression, so the expression is evaluated with an empty filter context! This gives a different result. DAX nested Functions is equivalent to SQL what? SQL subqueries What are the most common DAX functions used?
    1. FILTER function returns a subset of an expression or a table. FILTER(,)
    2. We could use ALL function to retrieve all of the values in a column or all of the rows in a given table, overriding any earlier filters. ALL(
    3. or )
      1. RELATED Function : This DAX function is intended to let you return a relevant value from a table other than the one you're currently working on. RELATED()
      2. TOTALYTD / TOTALQTD / TOTALMTD : This function is identical to the date and time functions in Microsoft Excel. TOTALYTD(,[,][,<year_end_date>])
      3. CALCULATE: With minimal effort, this function can ease complex and multiple calculations. The DAX CALCULATE function evaluates an expression in a context that has been altered by filters. CALCULATE(, ,) Which of the DAX functions do not return a table? Date and time functions in DAX return a datetime data type that is available in DAX. Are DAX functions case sensitive? As a formula language, DAX is case-insensitive. If we utilize SQL Server Analysis Services, we can select between case-sensitive and case-insensitive collation styles. What are DAX Aggregation functions? DAX Aggregation functions are important in calculations since they aggregate any expression across the rows of a table. DAX Aggregations functions are ADDCOLUMNS, AVERAGE, AVERAGEA, AVERAGEX, COUNT, COUNTA, COUNTAX, COUNTBLANK, COUNTROWS, COUNTX, CROSSJOIN, DISTINCTCOUNT, GENERATE, GENERATEALL, MAX, MAXA, MAXX, MIN, MINA, MINX, PRODUCT, PRODUCTX, ROW, SELECTCOLUMNS, SUM, SUMMARIZE, SUMMARIZE with Options SUMX, TOPN
      4. Which is the difference between a shared and local data set?  A local dataset only works for local data sources (I.e. Excel files).  A local dataset creates a live connection to the Power BI Service.  A shared dataset can be reused by multiple members of a workspace
      5. True or False: A Power BI Data model can contain only import tables or Direct Query tables; it is not possible to have both in the same data model.  True  False
      6. A client requires near-Real Time data displayed in their report. Choose the appropriate database connection type.  DirectQuery  Import  Storage Mode
      7. What are the two options available in Power Query to combine multiple tables together?  Merge and Sort  Merge and Append

       AVERAGE(‘Sales Order lines’[Unit Price]) && ‘Customer Category’[Customer Category Name] = ‘Novelty Shop’  CALCULATE(AVERAGE(‘Sales Order lines’[Unit Price]), ‘Customer Category’[Customer Category Name] = ‘Novelty Shop’)  CALCULATE(AVERAGE(‘Sales Order lines’[Unit Price]))

      1. Semi-additive calculations (i.e. balance at end of month) often use which of the following functions?  LASTDATE  SUM  AVERAGE
      2. Power BI’s Vertipaq Engine compresses the data loaded into Power BI to reduce model size and speed up report performance. Which of the following actions will have the largest positive impact on compression?  Renaming all columns to lowercase  Removing unnecessary columns from the data model  Optimizing Power Query joins  Removing unnecessary measures
      3. Imagine you have a datetime data column with various datetime values. Converting the column to a date datatype will have an effect on cardinality?  Increase  Decrease  The cardinality will stay the same.
      4. Aggregations are a useful feature to speed up model performance. Which of the following statements is true?  All data sources must be set to Direct Query mode.  All data sources must be set to Import mode.  At least one data source must be set to Direct Query and one data source must be set to Import mode.  Aggregations can work regardless of the data connection modes.
      5. You receive the following requirements: “I want to show the correlation between Quantity and Unit Price. I would like each individual transaction to show on the chart.” Which visualization type would best display the required data?  Bar Chart  Line Chart  Matrix  Scatter Chart
      6. You can interact with T and Python visuals by hovering over them and clicking on them to cross-filter other visualizations on the page.  True  False
      7. A report or dashboard will not render on the Power BI mobile app without firstly creating a custom mobile view.  True  False
      8. Data alerts can be set up on which of the following groups of visuals?  Cards, lines, charts, tables.  Cards, gauges, KPIs.  Matrixes, line charts, column charts.

       All of the above.

      1. When you pin a live report page from a report to a dashboard, the data will update automatically when the report data is refreshed?  True  False
      2. When creating a “Clear All Filters” bookmark, it is important to ensure that which of the following bookmark options is checked in order to save the state of the cleared page?  Data  Display  Current Page  All Visuals
      3. Which is not a valid option for editing interaction between visuals?  Filter  Cross-Highlight  Multi-select  No Interaction
      4. Sync Slicers allow slicer selections to carry over between pages. This functionality requires that all slicers be visible on each page  True  False
      5. Which of the following is NOT a function available in the Selection Pane?  Setting the tab order.  Hiding visuals on the report page.  Setting the layer order of visuals.  Syncing visuals across multiple pages.
      6. Your client wants to only show the five US states with the most orders in the past year. Which of the following methods will best visualise the necessary data?  Conditional formatting  Top-N analysis  Slicing and FIltering  Python and R visuals
      7. Which of the following options does NOT use Power BI’s baked-in artificial intelligence?  Quick Insights  Q&A Visual  Key Influencers visual  Python or R visuals
      8. Reference lines and forecasting can be applied in which pane?  Formatting Pane  Visualization Pane  Analytics Pane
      9. A client would like a clear view of the sales performance on weekdays and weekends. Which of the following functionality will help you easily provide the answer?  Binning  Decomposition Tree Visual  Grouping  Reference lines

      Which option does not allow you to hide a field from the Report view in Power BI Desktop? *  In Power BI Desktop Report view, right-click the field on the Fields list, and click Delete.  In Power BI Desktop Data view, right-click the column header on the respective table and click Hide in Report View.  In Power BI Desktop Relationships view, right-click the field on the respective table, and click Hide in Report View.  In Power BI Desktop Report view, right-click the field on the Fields list, and click Hide. In which of the following scenarios refreshing an imported data set in the Power BI Service require either the on-premises gateway or a personal gateway?  Refreshing a dataset which imports its data from a list in SharePoint Online.  Refreshing a dataset which imports its data from an Azure SQL database.  Refreshing a dataset which imports its data from an on-premises SQL Server database. What do you need to do to create many-to-many relationship between 2 tables?  Create relationship as normal and select Many to Many cardinality.  Create a bridge table that contains unique values  Join multiple columns of these tables.  Consider the following DAX formula for a calculated column in the Sales table: Unit Price = Sales [Revenue] / Sales[Units]. Which statement does not describe the DAX formula?  The formula creates a calculated column named Unit Price.  The value of the calculated column is dependent on the Revenue column.  The value of the calculated column is dependent on the Units column.  The Data type of the calculated column is Text. Which of the following resources are automatically provisioned when you create a new app workspace in the Power BI Service?  An Office 365 Group which triggers the creation of a SharePoint team site  A shared capacity which is used to host the workspace  A storage container for Power BI resources including datasets, reports, and dashboards Which of the following report page details are not recorded when you create a bookmark?  The sort order of rows in a Table visual  Whether a visual has been spotlighted or hidden  The next page in the current bookmark collection’s sequence  The current selection(s) for each slicer on the page Reports are often confused with dashboards since they too are canvases filled with visualizations. But there are some major differences. Which one allows you to filter, highlight, and slice, and also see data set tables and fields and values?  Report  Dashboard Which two cross filter directions are available in Power BI table relationships?  Double and Both  Multiple and Both  Both and Single  Single and Double

      You want to import data from Microsoft Access database to Power BI desktop but there is an error appearing on the screen. “The ‘Microsoft.ACE.OLEDN.12.0’ provider is not registered on the local machine”. What is the reason for this error?  Privacy is set to access database.  Access database is password protected.  Provider is not installed in the system.  Database name is wrong Which of the following platforms do not support R visuals?  Power BI Mobile APP (for reports hosted on app.powerbi.com)  Power BI Service  Reports hosted on Power BI Embedded(V2)  Publish to Web You are the BI developer at Adventure Works responsible for enabling report creation and sharing by business users. Currently, there is an on-premises data warehouse built with SQL Server 2017, and there are some files stored on a shared drive that contain sales targets. The files are updated manually on a weekly basis. All reports need to be refreshed automatically at-least once a day. Everyone in the organization has a Power BI Pro license. Adventure Works has a hot-desking policy, and all employees must lock their laptops in allocated cabinets. Some business users would like to be able to create their own reports and share them internally. Only a select group of users must have the rights to share reports externally. Adventure Works has a separate manager for each product category. One of the reports must be secured in such a way that each manager must be able to see the products of the category they manage only, while the CEO must be able to see all sales. An HR analyst maintains a table that maps the category name to the manager email address. The management requested your assistance in making sure that business users can create and share their Power BI reports within the organization. Based on background information and business requirements, answer the following question Business users ask your guidance on how they should configure automatic refresh. Which gateway installation mode is appropriate for Adventure Works?  On-Premises Data Gateway.  On-Premises Data Gateway (Personal Mode) The management requested two Power BI reports to be produced: one that shows all sales data, including transactions that happened in the past 10 minutes, and another report that tracks historical targets versus actual figures for the past 12 months. Historical report is prepared at the beginning of every month. Based on background information and business requirements, answer the following questions: Which data connectivity mode should you use for each report?  Direct Query for both  Import data for both  Direct Query for the historical data report, Import data for the sales targets report  Direct Query for the sales report, Import data for the historical data report Which of the following cardinalities are not available in Power BI table relationships?  Many to Single  One to Many  One to One  Many to Many The following table contains a Parent-Child hierarchy on the columns: Employee Key and Parent Employee Key. From the table you can see that employee 112 has no parent defined, employee 14 has employee 112 as manager (ParentEmployeeKey), employee 3 has employee 14 as manager and employees 11, 13, and 162 have employee 3 as manager. The above helps to understand that employee 112 has no manager above her/him, and she/he is the top manager for all employees. The

       Report What are the limitations of live connection?  Need extra steps to share reports with users with free Power BI license.  Some visuals are not supported in live connection mode  Transformation cannot be applied to data. Which command in the Power BI Desktop query editor is used to create a new query that uses the output of another query as its input source?  Pipe  Reference  Duplicate  Map Which statement does not describe the Applied Step’s area in the Query Editor window?  You can modify the connection to the data source by modifying the Source step settings.  It records the list of steps from connecting to the data source to all the steps applied to the data.  The recorded list is based on the step that has the least effect to the step that has the most effect to the data source.  The recorded list follows the sequence of steps applied to the data source. When connecting to an Access database, which entities are shown in the Navigator window?  Users from the Access database  Tables from the Access database.  Columns from the Access database  Rows in from Access database Which of the following statement is not true with regard to designing Power BI content for mobile devices?  The Power BI service dashboard designer provides Phone view in the browser to design dashboards which target mobile devices  The Power BI Desktop report designer provides Phone Layout View to design reports which target mobile devices.  The Power BI Service report designer provides Phone Layout View in the browser to design reports which target mobile devices.  The Power BI Desktop dashboard designer provides Phone view to design dashboards which target mobile devices. The DAX FORMAT function converts a value to text according to the specified format provided as the second argument to the function. Which of the following DAX expression formats the number to display 20.00%?  FORMAT (0.2, “p”)  FORMAT (0.2, “%”)  FORMAT (0.2, “Percent”)  FORMAT (20, “Percent”) Your company wants you to prepare a dashboard that shows the reports for 10 years of sales data. These reports will be used by company directors to see the monthly sales performance. You need to get data of 10 years from SQL server database. Is Direct Query best option to use in this scenario?  Yes  No Data has been scraped from a table on a popular retirement website. However, the Health care quality column’s scores were not automatically transformed from text to numbers when Query

      Editor loaded the table. You thus right clicked the column header, and selected Change Type > Whole Number to change them. Unfortunately, the Health care quality column contains a few times in states’ rankings, which was noted on the website by the word (tie) after their numbers. Query Editor thus reports a few errors. What is the consequence of using the Remove Errors option (ribbon or the right- click menu option) to resolve this?  Removes the applied step that has errors  Change the errors values to blank  Removes any rows with errors After you have pinned a report visual to create a dashboard tile, you can later modify the visual’s properties and the Power BI service will automatically update the dashboard tile with the new visual property values.  False  True To create a DAX formula that automatically calculates the previous month number as calculated column, for example if the month is 6 then formula should return 5. Month columns is calculated from date with formula below. Month = MONTH (Sales [Date]), Which of the following DAX formulas returns correct number for previous month?  Previous Month = PREVIOUSMONTH(Sales [Month])  Previous Month = Sales [Month]- 1  Previous Month = STARTOFMONTH(Sales [Month])- 1  Previous Month = IF (Sales [Month] =1, 12, Sales [Month]-1) How to create a chart by “Asking Question” feature?  Home - > Ask Question  Modeling - > Ask Question Into which of the following scopes can you import a custom visual created for Power BI?  Into the scope of an app workspace  Into the scope of a premium capacity  Into the scope of your personal workspace  Into the scope of a Power BI Desktop project What can you accomplish with data gateway?  View Report  Download Report  Refresh Data  Report Publish What happens when you click on Focus mode of a tile in Power BI dashboard?  The tile you selected expands and takes the full space  The Power BI desktop file gets downloaded  The report from which the tile was pinned opens.  The Power BI desktop file opens. You created a line chart that shows Quantity by Month and noticed month values are sorted alphabetically. How can you rectify this? Your solution should involve minimal effort.  Use the ellipsis menu in the visual to change the sort order.  Create a measure for each month and place them in the right order.  Create a Month Number column from Date or Month Name then use the Sort by Column feature in Modeling Tab and sort Month by Month Number. What is the purpose of the new Selection pane in the report designer in Power BI Desktop?  It is used to control the tab order between visuals on a page.  It is used to select data in a visual for highlighting and drill down  It is used to combine two or more visuals on a page into a visual group.  It is used to hide and show visuals on a page before recording a bookmark