Skip to content

Commit 95ec208

Browse files
committed
removing some unused image files and correcting transform article
1 parent ee2711e commit 95ec208

24 files changed

+99
-75
lines changed

docs/report/powerbi/add-last-refresh-time.md

+26-2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ To add a column with the last refresh date of the dataset, follow these steps.
3636
3737
If you haven't already modified the query, review the following examples with specific table values matching your Analytics view.
3838

39+
#### [Private view](#tab/private/)
40+
3941
```Query
4042
let
4143
Source = VSTS.AnalyticsViews("{OrganizationName}", "ProjectName}", []),
@@ -45,8 +47,18 @@ To add a column with the last refresh date of the dataset, follow these steps.
4547
#"{AnalyticsViewsID_Table}"
4648
```
4749

50+
#### [Shared view](#tab/shared/)
51+
52+
```Query
53+
let
54+
Source = VSTS.AnalyticsViews("{OrganizationName}", "{ProjectName}", []),
55+
#"{AnalyticsViewsID_Table}" = Source{[Id="{AnalyticsViewsID}",Kind="Table"]}[Data]
56+
in
57+
#"{AnalyticsViewsID_Table}"
58+
```
4859

49-
Modify the query as follows:
60+
***
61+
Modify the query according to the following syntax.
5062
5163
```Query
5264
let
@@ -59,6 +71,18 @@ To add a column with the last refresh date of the dataset, follow these steps.
5971
#"Added Refresh Date"
6072
```
6173

74+
```Query
75+
let
76+
Source = VSTS.AnalyticsViews("{OrganizationName}", "{ProjectName}", []),
77+
#"{AnalyticsViewsID_Table}" = Source{[Id="{AnalyticsViewsID}",Kind="Table"]}[Data]
78+
#"Added Refresh Date" = Table.AddColumn(#"{tableid}_Table", "Refresh Date",
79+
each DateTimeZone.FixedUtcNow(), type datetimezone)
80+
in
81+
#"Added Refresh Date"
82+
```
83+
84+
***
85+
6286
> [!IMPORTANT]
6387
> These examples use UTC. You can adjust the query code based on your specific timezone as described in [DateTimeZone functions](/powerquery-m/datetimezone-functions).
6488

@@ -67,7 +91,7 @@ To add a column with the last refresh date of the dataset, follow these steps.
6791
5. Choose **Close & Apply** to immediately refresh the dataset.
6892

6993
> [!div class="mx-imgBorder"]
70-
> ![Screenshot of Power BI Desktop, Home, Close & Apply.](media/powerbi-close-apply.png)
94+
> ![Screenshot of Power BI Desktop, Home, Close & Apply.](media/transform-data/powerbi-close-apply.png)
7195

7296
6. To add a card with the last refresh date to your reports, under **Visualizations**, choose **Card**, and add **Refresh Date** to **Fields**.
7397

docs/report/powerbi/create-quick-report-odataq.md

+39-3
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,47 @@ Create a Power BI Query to pull the data into Power BI as follows:
110110
111111
If you've never connected to your account, Power BI may require you to authenticate. For more information, see [Client authentication options](client-authentication-options.md).
112112
113-
## Create Power BI transforms
114113
115-
[!INCLUDE [temp](includes/sample-expandcolumns.md)]
114+
## Expand Area, Iteration, AssignedTo columns
116115
117-
[!INCLUDE [temp](includes/sample-finish-query.md)]
116+
The query returns several columns that you need to expand before you can use them in Power BI. Any entity pulled in using an `$expand` statement returns a record with potentially several fields. You need to expand the record to flatten the entity into its fields. Examples of such entities are: `AssignedTo`, `Iteration`, and `Area`.
117+
118+
After closing the **Advanced Editor** and while remaining in the **Power Query Editor**, select the expand button on the entities you need to flatten.
119+
120+
1. For example, choose the expand button for **Area**, select the properties you want to expand, and choose **OK**. Here, we choose `AreaName` and `AreaPath` to flatten. The `AreaName` property is similar to the **Node Name** field.
121+
122+
> [!div class="mx-imgBorder"]
123+
> ![Screenshot of Power BI transform data, Expand AreaPath column.](media/transform-data/expand-area-path-property.png)
124+
125+
> [!NOTE]
126+
> The available properties to select depends on the properties requested to return in the query. If you don't specify any properties, then all properties are available. To learn more about these properties, see the following metadata references: [Areas](entity-reference-boards.md#areas), [Iterations](entity-reference-boards.md#iterations), and [Users](entity-reference-general.md#users).
127+
128+
1. The table now contains entity field(s).
129+
130+
> [!div class="mx-imgBorder"]
131+
> ![Screenshot of expanded Area columns.](media/transform-data/expanded-area-columns.png)
132+
133+
1. Repeat steps 1 through 3 for all fields representing entities that need expanding. These appear with *Record* listed in the table column when unexpanded.
134+
135+
136+
## Rename fields and query, then Close & Apply
137+
138+
When finished, you may choose to rename columns.
139+
140+
1. Right-click a column header and select **Rename...**
141+
142+
> [!div class="mx-imgBorder"]
143+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
144+
145+
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
146+
147+
> [!div class="mx-imgBorder"]
148+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
149+
150+
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
151+
152+
> [!div class="mx-imgBorder"]
153+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
118154
119155
120156
## Create the report

docs/report/powerbi/create-team-filter.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ The next step is to add the *Teams* entity to the Power BI data model and genera
9595
11. On the Home tab, choose **Close & Apply**.
9696
9797
> [!div class="mx-imgBorder"]
98-
> ![Power BI Desktop, Home, Close & Apply](media/powerbi-close-apply.png)
98+
> ![Power BI Desktop, Home, Close & Apply](media/transform-data/powerbi-close-apply.png)
9999
100100
16. Next, choose **Refresh** to add *AreaSK* to the view.
101101

docs/report/powerbi/includes/sample-expandcolumns.md

-26
This file was deleted.

docs/report/powerbi/includes/sample-finish-query.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ When finished, you may choose to rename columns.
99
1. Right-click a column header and select **Rename...**
1010

1111
> [!div class="mx-imgBorder"]
12-
> ![Screenshot of Power BI transform data, Rename Columns.](/azure/devops/report/powerbi/media/powerbi-rename-columns.png)
12+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
1313

1414
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
1515

1616
> [!div class="mx-imgBorder"]
17-
> ![Screenshot of Power BI transform data, Rename Query.](/azure/devops/report/powerbi/media/powerbi-rename-query.png)
17+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
1818

1919
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
2020

2121
> [!div class="mx-imgBorder"]
22-
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](/azure/devops/report/powerbi/media/powerbi-close-apply.png)
22+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
2323

docs/report/powerbi/includes/sample-test-plans-finish-query.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ When finished, you may choose to rename columns.
99
1. Right-click a column header and select **Rename...**
1010

1111
> [!div class="mx-imgBorder"]
12-
> ![Screenshot of Power BI transform data, Rename Columns.](/azure/devops/report/powerbi/media/powerbi-rename-columns.png)
12+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
1313

1414
1. Change the type of count columns to **Whole Number** and percentage fields to **Decimal Number**.
1515

@@ -19,10 +19,10 @@ When finished, you may choose to rename columns.
1919
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
2020

2121
> [!div class="mx-imgBorder"]
22-
> ![Screenshot of Power BI transform data, Rename Query.](/azure/devops/report/powerbi/media/powerbi-rename-query.png)
22+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
2323

2424
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
2525

2626
> [!div class="mx-imgBorder"]
27-
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](/azure/devops/report/powerbi/media/powerbi-close-apply.png)
27+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
2828

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

docs/report/powerbi/odataquery-connect.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Replace `[Implementation="2.0"]` with the following string:
160160

161161
Select **Close & Apply** to save your settings and pull the data into Power BI. After the data is refreshed, you can create a report as you would normally in Power BI.
162162

163-
![Power BI "Close & Apply" button](media/powerbi-close-apply.png)
163+
![Power BI "Close & Apply" button](media/transform-data/powerbi-close-apply.png)
164164

165165
## Related articles
166166

docs/report/powerbi/sample-test-plans-aggregate-data-level.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ When finished, you may choose to rename columns.
195195
1. Right-click a column header and select **Rename...**
196196

197197
> [!div class="mx-imgBorder"]
198-
> ![Screenshot of Power BI transform data, Rename Columns.](media/powerbi-rename-columns.png)
198+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
199199

200200
1. Change the type of count columns to **Whole Number** and percentage fields to **Decimal Number**.
201201

@@ -205,12 +205,12 @@ When finished, you may choose to rename columns.
205205
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
206206

207207
> [!div class="mx-imgBorder"]
208-
> ![Screenshot of Power BI transform data, Rename Query.](media/powerbi-rename-query.png)
208+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
209209

210210
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
211211

212212
> [!div class="mx-imgBorder"]
213-
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/powerbi-close-apply.png)
213+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
214214

215215

216216
## Create the report

docs/report/powerbi/sample-test-plans-configuration-by-outcome.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ When finished, you may choose to rename columns.
149149
1. Right-click a column header and select **Rename...**
150150

151151
> [!div class="mx-imgBorder"]
152-
> ![Screenshot of Power BI transform data, Rename Columns.](media/powerbi-rename-columns.png)
152+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
153153

154154
1. Change the type of count columns to **Whole Number** and percentage fields to **Decimal Number**.
155155

@@ -159,12 +159,12 @@ When finished, you may choose to rename columns.
159159
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
160160

161161
> [!div class="mx-imgBorder"]
162-
> ![Screenshot of Power BI transform data, Rename Query.](media/powerbi-rename-query.png)
162+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
163163

164164
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
165165

166166
> [!div class="mx-imgBorder"]
167-
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/powerbi-close-apply.png)
167+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
168168

169169

170170
## Create the report

docs/report/powerbi/sample-test-plans-tester-by-outcome.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ When finished, you may choose to rename columns.
144144
1. Right-click a column header and select **Rename...**
145145

146146
> [!div class="mx-imgBorder"]
147-
> ![Screenshot of Power BI transform data, Rename Columns.](media/powerbi-rename-columns.png)
147+
> ![Screenshot of Power BI transform data, Rename Columns.](media/transform-data/powerbi-rename-columns.png)
148148

149149
1. Change the type of count columns to **Whole Number** and percentage fields to **Decimal Number**.
150150

@@ -154,12 +154,12 @@ When finished, you may choose to rename columns.
154154
1. You also may want to rename the query from the default **Query1**, to something more meaningful.
155155

156156
> [!div class="mx-imgBorder"]
157-
> ![Screenshot of Power BI transform data, Rename Query.](media/powerbi-rename-query.png)
157+
> ![Screenshot of Power BI transform data, Rename Query.](media/transform-data/powerbi-rename-query.png)
158158

159159
1. Once done, choose **Close & Apply** to save the query and return to Power BI.
160160

161161
> [!div class="mx-imgBorder"]
162-
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/powerbi-close-apply.png)
162+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
163163

164164

165165
## Create the report

docs/report/powerbi/toc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ items:
5656
- name: Connect using Advanced Functions
5757
href: data-connector-functions.md
5858
- name: Publish a Power BI Desktop file to Power BI
59-
href: publish-power-bi-desktop-to-power-bi
59+
href: publish-power-bi-desktop-to-power-bi.md
6060
- name: Sample queries, Work tracking
6161
items:
6262
- name: Retrieve work item data

docs/report/powerbi/transform-analytics-data-report-generation.md

+16-26
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ ms.date: 12/09/2022
1717

1818
Once you've imported your Analytics data into Power BI, you may need to transform select column data prior to creating a report. This article shows you how to perform some of these basic tasks, such as:
1919

20-
- Expand columns, such as **Area**, **AssignedTo**, and **Iteration**. .
20+
- Expand columns, such as **Area**, **AssignedTo**, and **Iteration**
2121
- Expand descendant columns when querying linked work items
2222
- Pivot columns to generate counts for select category states
2323
- Transform the column data type from decimal to whole numbers
2424
- Replace null values in column data
2525
- Create a custom field
26-
- Rename fields
26+
- Rename fields.
2727

2828
## Expand columns
2929

@@ -39,7 +39,7 @@ After closing the Advanced Editor and while remaining in the Power Query Editor,
3939
1. Select the fields to flatten.
4040

4141
> [!div class="mx-imgBorder"]
42-
> ![Select the fields to flatten.](/azure/devops/report/powerbi/media/odatapowerbi/expandcolumn2.png)
42+
> ![Select the fields to flatten.](media/transform/dataexpand-area-path-property.png) /azure/devops/report/powerbi/media/odatapowerbi/expandcolumn2.png)
4343
4444
1. The table now contains entity field(s).
4545

@@ -94,33 +94,18 @@ The **Descendants** column contains a table with two fields: **State** and **Tot
9494

9595
### Expand the Links column
9696

97-
1. Select the expand button on the Links column.
97+
1. Select the expand button on the `Links` column.
9898

99-
> [!div class="mx-imgBorder"]
100-
> ![Power BI + OData - expanding a Links column](media/odatapowerbi-expandlinks.png)
10199
:::image type="content" source="media/transform-data/links-column-expand.png" alt-text="Screenshot of Power BI Links column, expand options. ":::
102100

103101
1. Select all the fields to flatten.
104102

105-
> [!div class="mx-imgBorder"]
106-
> ![Select all the fields to flatten.](media/odatapowerbi-expandlinks2.png)
107103
:::image type="content" source="media/transform-data/links-column-expand.png" alt-text="Screenshot of Power BI Links column, expand options. ":::
108104

109-
1. Select the expand button on the Links.TargetWorkItem column.
105+
1. Select the expand button on the `Links.TargetWorkItem` column and select the properties to flatten.
110106

111-
> [!div class="mx-imgBorder"]
112-
> ![Select the expand button on the Links.TargetWorkItem column.](media/odatapowerbi-expandlinks3.png)
113107
:::image type="content" source="media/transform-data/links-target-work-item-column-expand.png" alt-text="Screenshot of Power BI Links.TargetWorkItem column, expand options. ":::
114108

115-
1. Select the fields of the Target Work Item to flatten.
116-
117-
> [!div class="mx-imgBorder"]
118-
> ![Select the fields of the Target Work Item to flatten.](media/odatapowerbi-expandlinks4.png)
119-
120-
The Table now contains flattened Link and Target Work Item field(s).
121-
122-
> [!div class="mx-imgBorder"]
123-
> ![The Table now contains flattened Link and Target Work Item field(s).](media/odatapowerbi-expandlinks5.png)
124109

125110
> [!NOTE]
126111
> If the link represents a one-to-many or many-to-many relationship, then multiple links will
@@ -136,15 +121,18 @@ The **Descendants** column contains a table with two fields: **State** and **Tot
136121
## Transform a column data type
137122

138123
<a id="leadtimedays-cycletimedays" />
124+
139125

140-
### Transform the LeadTimeDays and CycleTimeDays columns to whole Numbers
126+
### Transform LeadTimeDays and CycleTimeDays to whole numbers
141127

142128
The `LeadTimeDays` and `CycleTimeDays` are decimal fields. For example if **Lead Time** is 10 and 1/2 days, the value is 10.5. Since most Lead/Cycle Time reports assume that it's rounded to the nearest day, we need to convert these fields to an Integer. Making this conversion converts all values less than 1 to 0.
143129

144-
From the Power Query Editor, select the ribbon **Transform** menu.
130+
From the Power Query Editor, select the ribbon **Transform** menu.
131+
132+
1. Select the `LeadTimeDays` column by selecting the column header.
133+
134+
1. Select **Data Type** and change to **Whole Numbers**.
145135

146-
1. Select the `LeadTimeDays` column by selecting the column header.
147-
1. Select **Data Type** and change to **Whole Numbers**.
148136
:::image type="content" source="media/transform-data/change-data-type-lead-time.png" alt-text="Screenshot of Power BI Transform menu, Data type selection.":::
149137

150138
1. Repeat for `CycleTimeDays`.
@@ -185,6 +173,8 @@ For easier reporting, replace nulls with zero by following these steps.
185173
## Create a custom column
186174

187175
<a id="create-percent-complete" />
176+
177+
188178

189179
### Create a percentage complete computed column
190180

@@ -214,7 +204,7 @@ When finished with your expansion, you may choose to rename one or more columns.
214204
1. Right-click a column header and select **Rename...**
215205
216206
> [!div class="mx-imgBorder"]
217-
> ![Power BI Rename Columns](/azure/devops/report/powerbi/media/powerbi-rename-columns.png)
207+
> ![Power BI Rename Columns](media/transform-data/powerbi-rename-columns.png)
218208
219209
1. Enter a new label for the column field and then press Enter.
220210
@@ -224,7 +214,7 @@ When finished with your expansion, you may choose to rename one or more columns.
224214
1. Once you've completed all your data transformations, choose **Close & Apply** to save the query and return to Power BI.
225215
226216
> [!div class="mx-imgBorder"]
227-
> ![Power BI Close & Apply](/azure/devops/report/powerbi/media/powerbi-close-apply.png)
217+
> ![Screenshot of Power BI Power Query Editor, Close & Apply.](media/transform-data/powerbi-close-apply.png)
228218
229219
230220

0 commit comments

Comments
 (0)