注:この問題は、同じシナリオを提示する一連の問題の一部です。このシリーズの各問題には、提示された目標を満たす可能性のある独自の解答が含まれています。問題セットによっては、複数の正解がある場合もあれば、正解がない場合もあります。
このセクションの質問に回答すると、後から戻って回答することはできません。そのため、これらの質問は復習画面には表示されません。
Azure SQLデータベースのデータソースから日付テーブルと売上テーブルをインポートするPower BIレポートがあります。売上テーブルには、次の日付外部キーがあります。
- 期日
- 注文日
- 配送日
すべての日付外部キーに基づいて、時系列での売上分析をサポートする必要があります。
解決策:フィールドペインから、日付テーブルの名前を「期日」に変更します。DAX式を使用して、注文日と配送日を計算テーブルとして作成します。
これは目標を達成していると言えるでしょうか?
正解:A
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 the ArrivalAirport 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 a DirectQuery 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