You have a Power BI report that imports a date table and a sales table from an Azure SQL database data source. The sales table has the following date foreign keys:
✑ Due Date
✑ Order Date
✑ Delivery Date
You need to support the analysis of sales over time based on all the date foreign keys.
For each date foreign key, you add inactive relationships between the sales table and the date table.
Does this meet the goal?
No
From the Fields pane, you rename the date table as Due Date. You use a DAX expression to create Order Date and Delivery Date as calculated tables.Reference:https://docs.microsoft.com/en-us/power-bi/guidance/relationships-active-inactive
From Power Query Editor, you rename the date query as Due Date. You reference the Due Date query twice to make the queries for Order Date andDelivery Date.
From the Fields pane, you rename the date table as Due Date. You use a DAX expression to create Order Date and Delivery Date as calculated tables.
Yes
Refactoring methodology -Here's a methodology to refactor a model from a single role-playing dimension-type table, to a design with one table per role.1. Remove any inactive relationships.2. Consider renaming the role-playing dimension-type table to better describe its role. In the example (not present here), the Airport table is related to theArrivalAirport column of the Flight table, so it's renamed as Arrival Airport.3. Create a copy of the role-playing table, providing it with a name that reflects its role. If it's an Import table, we recommend defining a calculated table. If it's aDirectQuery table, you can duplicate the Power Query query.In the example, the Departure Airport table was created by using the following calculated table definition.Departure Airport = 'Arrival Airport'Create an active relationship to relate the new table.4. Consider renaming the columns in the tables so they accurately reflect their role. In the example, all columns are prefixed with the word Departure or Arrival.These names ensure report visuals, by default, will have self-describing and non-ambiguous labels. It also improves the Q&A experience, allowing users to easily write their questions.5. Consider adding descriptions to role-playing tables. (In the Fields pane, a description appears in a tooltip when a report author hovers their cursor over the table.) This way, you can communicate any additional filter propagation details to your report authors.Reference:https://docs.microsoft.com/en-us/power-bi/guidance/relationships-active-inactive
You receive revenue data that must be included in Microsoft Power BI reports.You preview the data from a Microsoft Excel source in Power Query as shown in the following exhibit.
You plan to create several visuals from the data, including a visual that shows revenue split by year and product.You need to transform the data to ensure that you can build the visuals. The solution must ensure that the columns are named appropriately for the data that they contain.Which three actions should you perform in sequence? To answer, move the appropriate actions from the list of actions to the answer area and arrange them in the correct order.Select and Place:
Step 1: Select Department and Product and Unpivot Other Columns The Unpivot Other Columns command unpivots unselected columns. Use this command in a query when not all columns are known. New columns added during a refresh operation are also unpivoted. Note: Unpivot columns: In Power Query, you can transform columns into attribute-value pairs, where columns become rows.
Step 2: Rename the Attribue column to Year and the Value Column to RevenueNeed to do this after the unpivot.Power Query will always create the attribute-value pair by using two columns:Attribute: The name of the column headings that were unpivoted.Value: The values that were underneath each of the unpivoted column headings.Step 3: Select Use the First Row as HeadersReference:https://docs.microsoft.com/en-us/power-query/unpivot-column
Last changed8 months ago