Примечание.
Для доступа к этой странице требуется авторизация. Вы можете попробовать войти или изменить каталоги.
Для доступа к этой странице требуется авторизация. Вы можете попробовать изменить каталоги.
В этой статье представлена разбивка структуры определения для элементов отчета.
Поддерживаемые форматы
Определения отчетов могут использовать либо PBIR формат PBIR-Legacy , но не одновременно. Формат отчета соответствует тому, как он хранится в службе, если он хранится в качестве PBIRфайла, он будет возвращен в PBIR формате.
По умолчанию PBIR используется формат.
Части определения
| Путь к части определения | тип | Обязательный | Описание |
|---|---|---|---|
StaticResources/ |
Часть StaticResources | false | Папка, содержащая файлы ресурсов, относящиеся к отчету и загруженные пользователем, такие как пользовательские темы, изображения и пользовательские визуальные элементы. |
definition/ |
definition/ parts (PBIR) | True 1 | Определение отчета Power BI (e.g. pages, визуальных элементов, закладок) с помощью формата JSON PBIR в качестве папки. |
report.json |
report.json часть (PBIR-Legacy) | True 1 | Определение отчета Power BI (e.g. pages, визуальных элементов, закладок) с помощью одного JSON-файла PBIR-Legacy. |
semanticModelDiagramLayout.json |
частьsemanticModelDiagramLayout.json | false | Содержит схемы модели данных, описывающие структуру семантической модели, связанной с отчетом. |
definition.pbir |
Часть definition.pbir | истина | Общее определение отчета и основных параметров. Также содержит ссылку на семантику отчета, можно повторно привязать отчет к другой семантической модели, обновив этот файл. |
1 — definition/ часть требуется для PBIR формата, а report.json для формата требуется PBIR-Legacy . Это взаимоисключающее— в отчете используется один формат или другой, а не оба.
Дополнительные сведения о файлах определения отчетов см. в документации по Проекту Power BI.
Пример полезных данных с использованием PBIR формата:
Report/
├── StaticResources/
│ ├── RegisteredResources/
│ │ ├── logo.jpg
│ │ ├── CustomTheme4437032645752863.json
├── definition/
│ ├── bookmarks/
│ │ ├── Bookmark7c19b7211ada7de10c30.bookmark.json
│ │ ├── bookmarks.json
│ ├── pages/
│ │ ├── 61481e08c8c340011ce0/
│ │ │ ├── visuals/
│ │ │ │ ├── 3852e5607b224b8ebd1a/
│ │ │ │ │ ├── visual.json
│ │ │ │ │ ├── mobile.json
│ │ │ │ ├── 7df3763f63115a096029/
│ │ │ │ │ ├── visual.json
│ │ │ ├── page.json
│ │ ├── pages.json
│ ├── version.json
│ ├── report.json
├── semanticModelDiagramLayout.json
└── definition.pbir
{
"parts": [
{
"path": "definition/report.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/version.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/pages/pages.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/pages/61481e08c8c340011ce0/page.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/pages/61481e08c8c340011ce0/visuals/3852e5607b224b8ebd1a/visual.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/pages/61481e08c8c340011ce0/visuals/3852e5607b224b8ebd1a/mobile.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/pages/61481e08c8c340011ce0/visuals/7df3763f63115a096029/visual.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/bookmarks/Bookmark7c19b7211ada7de10c30.bookmark.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition/bookmarks/bookmarks.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "StaticResources/RegisteredResources/logo.jpg",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "StaticResources/RegisteredResources/CustomTheme4437032645752863.json",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
},
{
"path": "definition.pbir",
"payload": "<base64 encoded string>",
"payloadType": "InlineBase64"
}
]
}
определение или часть
definition/ Пример папки:
definition/
├── bookmarks/
│ ├── Bookmark7c19b7211ada7de10c30.bookmark.json
│ ├── bookmarks.json
├── pages/
│ ├── 61481e08c8c340011ce0/
│ │ ├── visuals/
│ │ │ ├── 3852e5607b224b8ebd1a/
│ │ │ │ ├── visual.json
│ │ │ │ ├── mobile.json
│ │ │ ├── 7df3763f63115a096029/
│ │ │ │ ├── visual.json
│ │ ├── page.json
│ ├── pages.json
├── version.json
├── report.json
Пример report.json
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/report/3.1.0/schema.json",
"themeCollection": {
"baseTheme": {
"name": "CY25SU12",
"reportVersionAtImport": {
"visual": "2.5.0",
"report": "3.1.0",
"page": "2.3.0"
},
"type": "SharedResources"
},
"customTheme": {
"name": "AccessibleCityPark",
"reportVersionAtImport": {
"visual": "2.5.0",
"report": "3.1.0",
"page": "2.3.0"
},
"type": "SharedResources"
}
},
"objects": {
"outspacePane": [
{
"properties": {
"expanded": {
"expr": {
"Literal": {
"Value": "false"
}
}
},
"visible": {
"expr": {
"Literal": {
"Value": "true"
}
}
}
}
}
]
},
"publicCustomVisuals": [
"Gantt1448688115699" // Unique name of the custom visual. This name is used in the `visual.visualType` property of the `visual.json` files.
],
"resourcePackages": [
{
"name": "SharedResources",
"type": "SharedResources",
"items": [
{
"name": "CY25SU12",
"path": "BaseThemes/CY25SU12.json",
"type": "BaseTheme"
},
{
"name": "AccessibleCityPark",
"path": "BuiltInThemes/AccessibleCityPark.json",
"type": "CustomTheme"
}
]
},
{
"name": "RegisteredResources",
"type": "RegisteredResources",
"items": [
{
"name": "fabric_48_color21993586118811193.svg",
"path": "fabric_48_color21993586118811193.svg",
"type": "Image"
}
]
}
],
"settings": {
"useStylableVisualContainerHeader": true,
"defaultFilterActionIsDataFilter": true,
"defaultDrillFilterOtherVisuals": true,
"allowChangeFilterTypes": true,
"allowInlineExploration": true,
"useEnhancedTooltips": true
},
"slowDataSourceSettings": {
"isCrossHighlightingDisabled": false,
"isSlicerSelectionsButtonEnabled": false,
"isFilterSelectionsButtonEnabled": false,
"isFieldWellButtonEnabled": false,
"isApplyAllButtonEnabled": false
}
}
Пример pages/61481e08c8c340011ce0/page.json
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/page/2.0.0/schema.json",
"name": "61481e08c8c340011ce0",
"displayName": "Page 1",
"displayOption": "FitToPage",
"height": 720,
"width": 1280
}
Пример pages/61481e08c8c340011ce0/visuals/3852e5607b224b8ebd1a/visual.json
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definition/visualContainer/2.0.0/schema.json",
"name": "3852e5607b224b8ebd1a",
"position": {
"x": 479.17437557394328,
"y": 210.50760538349616,
"z": 1000,
"height": 272.09459029940882,
"width": 341.09465386815845,
"tabOrder": 1000
},
"visual": {
"visualType": "barChart",
"query": {
"queryState": {
"Category": {
"projections": [
{
"field": {
"Column": {
"Expression": {
"SourceRef": {
"Entity": "Product"
}
},
"Property": "Brand"
}
},
"queryRef": "Product.Brand",
"active": true
},
{
"field": {
"Column": {
"Expression": {
"SourceRef": {
"Entity": "Product"
}
},
"Property": "Product"
}
},
"queryRef": "Product.Product",
"active": false
}
]
},
"Series": {
"projections": [
{
"field": {
"Column": {
"Expression": {
"SourceRef": {
"Entity": "Customer"
}
},
"Property": "Gender"
}
},
"queryRef": "Customer.Gender"
}
]
},
"Y": {
"projections": [
{
"field": {
"Measure": {
"Expression": {
"SourceRef": {
"Entity": "Sales"
}
},
"Property": "Sales Amount"
}
},
"queryRef": "Measure Table.Sales Amount"
}
]
}
},
"sortDefinition": {
"sort": [
{
"field": {
"Measure": {
"Expression": {
"SourceRef": {
"Entity": "Sales"
}
},
"Property": "Sales Amount"
}
},
"direction": "Descending"
}
]
}
},
"drillFilterOtherVisuals": true
},
"filterConfig": {
"filters": [
{
"name": "Filter",
"field": {
"Column": {
"Expression": {
"SourceRef": {
"Entity": "Calendar"
}
},
"Property": "Year"
}
},
"type": "Categorical",
"howCreated": "User"
}
]
}
}
Часть definition.pbir
Пример файла, предназначенного definition.pbir для папки локальной семантической модели:
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definitionProperties/2.0.0/schema.json",
"version": "4.0",
"datasetReference": {
"byPath": {
"path": "../Sales.SemanticModel"
}
}
}
Пример файла, предназначенного definition.pbir для семантической модели в рабочей области:
{
"$schema": "https://developer.microsoft.com/json-schemas/fabric/item/report/definitionProperties/2.0.0/schema.json",
"version": "4.0",
"datasetReference": {
"byConnection": {
"connectionString": "semanticmodelid=[SemanticModelId]"
}
}
}
semanticModelDiagramLayout.json часть
semanticModelDiagramLayout.json Пример файла:
{
"version": "1.1.0",
"diagrams": [
{
"ordinal": 0,
"scrollPosition": {
"x": 0,
"y": 74.883720930232556
},
"nodes": [
{
"location": {
"x": 942.5095849858792,
"y": 14.090768666666882
},
"nodeIndex": "[Table Name]",
"nodeLineageTag": "[Table Lineage Tag]",
"size": {
"height": 1000,
"width": 254
},
"zIndex": 5
},
{
"location": {
"x": 537.83428438628755,
"y": 836.33418866666739
},
"nodeIndex": "[Table Name]",
"nodeLineageTag": "[Table Lineage Tag]",
"size": {
"height": 481,
"width": 276
},
"zIndex": 2
}
],
"name": "All tables",
"zoomValue": 74.782608695652172,
"pinKeyFieldsToTop": false,
"showExtraHeaderInfo": false,
"hideKeyFieldsWhenCollapsed": false,
"tablesLocked": false
}
],
"selectedDiagram": "All tables",
"defaultDiagram": "All tables"
}