Skip to content

Commit 0f91d8e

Browse files
Merge pull request #295 from MicrosoftDocs/main638778457193434111sync_temp
For protected branch, push strategy should use PR and merge to target branch method to work around git push error
2 parents 0ed6374 + d99c040 commit 0f91d8e

8 files changed

Lines changed: 389 additions & 4 deletions
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: DataZoeMS
3+
ms.author: zoedouglas
4+
ms.date: 03/17/2025
5+
ms.topic: include
6+
ms.service: powerbi
7+
ms.subservice: dax
8+
---
9+
Applies to: :::image type="icon" source="../media/icons/no.png":::Calculated column :::image type="icon" source="../media/icons/no.png":::Calculated table :::image type="icon" source="../media/icons/no.png":::Measure :::image type="icon" source="../media/icons/no.png":::Visual calculation :::image type="icon" source="../media/icons/yes.png":::DAX query
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
author: DataZoeMS
3+
ms.author: zoedouglas
4+
ms.date: 03/17/2025
5+
ms.topic: include
6+
ms.service: powerbi
7+
ms.subservice: dax
8+
---
9+
### ObjectType
10+
11+
| Number | Value |
12+
|-------------|------------------------|
13+
| 0 | Null |
14+
| 1 | Model |
15+
| 2 | DataSource |
16+
| 3 | Table |
17+
| 4 | Column |
18+
| 5 | AttributeHierarchy |
19+
| 6 | Partition |
20+
| 7 | Relationship |
21+
| 8 | Measure |
22+
| 9 | Hierarchy |
23+
| 10 | Level |
24+
| 11 | Annotation |
25+
| 12 | KPI |
26+
| 13 | Culture |
27+
| 14 | ObjectTranslation |
28+
| 15 | LinguisticMetadata |
29+
| 29 | Perspective |
30+
| 30 | PerspectiveTable |
31+
| 31 | PerspectiveColumn |
32+
| 32 | PerspectiveHierarchy |
33+
| 33 | PerspectiveMeasure |
34+
| 34 | Role |
35+
| 35 | RoleMembership |
36+
| 36 | TablePermission |
37+
| 37 | Variation |
38+
| 38 | Set |
39+
| 39 | PerspectiveSet |
40+
| 40 | ExtendedProperty |
41+
| 41 | Expression |
42+
| 42 | ColumnPermission |
43+
| 43 | DetailRowsDefinition |
44+
| 44 | RelatedColumnDetails |
45+
| 45 | GroupByColumn |
46+
| 46 | CalculationGroup |
47+
| 47 | CalculationItem |
48+
| 48 | AlternateOf |
49+
| 49 | RefreshPolicy |
50+
| 50 | FormatStringDefinition |
51+
52+
This table is based on the [official documentation](/dotnet/api/microsoft.analysisservices.tabular.objecttype).
53+
54+
To join with INFO functions use this DAX query.
55+
56+
```dax
57+
EVALUATE
58+
DATATABLE(
59+
"ObjectType",INTEGER,
60+
"Object",STRING,
61+
{
62+
{0,"Null"},
63+
{1,"Model"},
64+
{2,"DataSource"},
65+
{3,"Table"},
66+
{4,"Column"},
67+
{5,"AttributeHierarchy"},
68+
{6,"Partition"},
69+
{7,"Relationship"},
70+
{8,"Measure"},
71+
{9,"Hierarchy"},
72+
{10,"Level"},
73+
{11,"Annotation"},
74+
{12,"KPI"},
75+
{13,"Culture"},
76+
{14,"ObjectTranslation"},
77+
{15,"LinguisticMetadata"},
78+
{29,"Perspective"},
79+
{30,"PerspectiveTable"},
80+
{31,"PerspectiveColumn"},
81+
{32,"PerspectiveHierarchy"},
82+
{33,"PerspectiveMeasure"},
83+
{34,"Role"},
84+
{35,"RoleMembership"},
85+
{36,"TablePermission"},
86+
{37,"Variation"},
87+
{38,"Set"},
88+
{39,"PerspectiveSet"},
89+
{40,"ExtendedProperty"},
90+
{41,"Expression"},
91+
{42,"ColumnPermission"},
92+
{43,"DetailRowsDefinition"},
93+
{44,"RelatedColumnDetails"},
94+
{45,"GroupByColumn"},
95+
{46,"CalculationGroup"},
96+
{47,"CalculationItem"},
97+
{48,"AlternateOf"},
98+
{49,"RefreshPolicy"},
99+
{50,"FormatStringDefinition"}
100+
}
101+
)
102+
```
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
author: DataZoeMS
3+
ms.author: zoedouglas
4+
ms.date: 03/17/2025
5+
ms.topic: include
6+
ms.service: powerbi
7+
ms.subservice: dax
8+
---
9+
## Enumerations
10+
11+
Columns returned in this INFO function give the ID of an enumeration, or lookup table. Here are the values for each enumeration in this DAX function.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
author: DataZoeMS
3+
ms.author: zoedouglas
4+
ms.date: 03/17/2025
5+
ms.topic: include
6+
ms.service: powerbi
7+
ms.subservice: dax
8+
---
9+
## Parameters
10+
11+
Parameters are optional for this DAX function. When parameters are used, both must be given. More than one pair of parameters is allowed. The restriction name and value are text and entered in double-quotes.
12+
13+
| Term | Definition |
14+
|---|---|
15+
| Restriction name | Name of the restriction used to filter the results. |
16+
| Restriction value | Value used to filter the results of the restriction. |
17+
18+
## Restrictions
19+
20+
Typically, all columns of the DAX function results can be used as a restriction. Additional restrictions may also be allowed.
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
---
2+
description: "Learn more about: INFO.ANNOTATIONS"
3+
title: "INFO.ANNOTATIONS function (DAX)"
4+
author: DataZoeMS
5+
---
6+
# INFO.ANNOTATIONS
7+
8+
[!INCLUDE[applies-to-query-only](includes/applies-to-query-only.md)]
9+
10+
Returns a table with information about each annotation in the semantic model. This information helps you understand the model.
11+
12+
## Syntax
13+
14+
```dax
15+
INFO.ANNOTATIONS([<Restriction name>, <Restriction value>], ...)
16+
```
17+
18+
[!INCLUDE[parameters-for-info-dax-functions](includes/parameters-for-info-dax-functions.md)]
19+
20+
## Return value
21+
22+
A table with the following columns:
23+
24+
| Column | Description |
25+
|---|---|
26+
| [ID] | A reference to the object. IDs are usually autogenerated and should not be changed after the model is created. Data type is unsigned long (4 bytes). |
27+
| [ObjectID] | A reference to the object that owns this Annotation. |
28+
| [ObjectType] | A reference to the type of object that owns this Annotation. |
29+
| [Name] | The name of the object, used in code, script, and queries. |
30+
| [Value] | The value of the annotation. |
31+
| [ModifiedTime] | The time that the object was last modified. |
32+
33+
## Remarks
34+
35+
Can only be ran by users with write permission on the semantic model and not when live connected to the semantic model in Power BI Desktop. This function can be used in [DAX queries](/dax/dax-queries), and can't be used in calculations.
36+
37+
## Example 1 - DAX query
38+
39+
The following DAX query can be run in [DAX query view](/power-bi/transform-model/dax-query-view):
40+
41+
```dax
42+
EVALUATE
43+
INFO.ANNOTATIONS()
44+
```
45+
46+
This DAX query returns a table with all of the columns of this DAX function.
47+
48+
## Example 2 - DAX query with joins
49+
50+
The following DAX query can be run in [DAX query view](/power-bi/transform-model/dax-query-view):
51+
52+
```dax
53+
EVALUATE
54+
VAR _ObjectTypeEnum =
55+
DATATABLE(
56+
"ObjectType",INTEGER,
57+
"Object",STRING,
58+
{
59+
{0,"Null"},
60+
{1,"Model"},
61+
{2,"DataSource"},
62+
{3,"Table"},
63+
{4,"Column"},
64+
{5,"AttributeHierarchy"},
65+
{6,"Partition"},
66+
{7,"Relationship"},
67+
{8,"Measure"},
68+
{9,"Hierarchy"},
69+
{10,"Level"},
70+
{11,"Annotation"},
71+
{12,"KPI"},
72+
{13,"Culture"},
73+
{14,"ObjectTranslation"},
74+
{15,"LinguisticMetadata"},
75+
{29,"Perspective"},
76+
{30,"PerspectiveTable"},
77+
{31,"PerspectiveColumn"},
78+
{32,"PerspectiveHierarchy"},
79+
{33,"PerspectiveMeasure"},
80+
{34,"Role"},
81+
{35,"RoleMembership"},
82+
{36,"TablePermission"},
83+
{37,"Variation"},
84+
{38,"Set"},
85+
{39,"PerspectiveSet"},
86+
{40,"ExtendedProperty"},
87+
{41,"Expression"},
88+
{42,"ColumnPermission"},
89+
{43,"DetailRowsDefinition"},
90+
{44,"RelatedColumnDetails"},
91+
{45,"GroupByColumn"},
92+
{46,"CalculationGroup"},
93+
{47,"CalculationItem"},
94+
{48,"AlternateOf"},
95+
{49,"RefreshPolicy"},
96+
{50,"FormatStringDefinition"}
97+
}
98+
)
99+
100+
VAR _INFO =
101+
INFO.ANNOTATIONS()
102+
103+
VAR _CombinedTable =
104+
NATURALLEFTOUTERJOIN(
105+
_INFO,
106+
_ObjectTypeEnum
107+
)
108+
109+
VAR _ModelObjects =
110+
UNION(
111+
SELECTCOLUMNS(
112+
INFO.MEASURES(),
113+
"ObjectID", [ID],
114+
"Object Name", [Name]
115+
),
116+
SELECTCOLUMNS(
117+
INFO.TABLES(),
118+
"ObjectID", [ID],
119+
"Object Name", [Name]
120+
),
121+
SELECTCOLUMNS(
122+
INFO.COLUMNS(),
123+
"ObjectID", [ID],
124+
"Object Name", [ExplicitName]
125+
),
126+
SELECTCOLUMNS(
127+
INFO.EXPRESSIONS(),
128+
"ObjectID", [ID],
129+
"Object Name", [Name]
130+
),
131+
SELECTCOLUMNS(
132+
INFO.MODEL(),
133+
"ObjectID", [ID],
134+
"Object Name", [Name]
135+
)
136+
)
137+
138+
VAR _CombinedTable2 =
139+
NATURALLEFTOUTERJOIN(
140+
_CombinedTable,
141+
_ModelObjects
142+
)
143+
144+
RETURN
145+
SELECTCOLUMNS(
146+
_CombinedTable2,
147+
"Object type", [Object],
148+
"Object", [Object Name],
149+
"Annotation name", [Name],
150+
"Annotation value", [Value]
151+
)
152+
ORDER BY [Annotation name]
153+
```
154+
155+
This DAX query returns a table with only the specified columns and joining to other INFO DAX functions and the enumeration table.
156+
157+
[!INCLUDE[enum-title-for-info-dax-functions](includes/enum-title-for-info-dax-functions.md)]
158+
159+
[!INCLUDE[enum-objecttype](includes/enum-objecttype.md)]
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
description: "Learn more about: INFO.CALCDEPENDENCY"
3+
title: "INFO.CALCDEPENDENCY function (DAX)"
4+
author: DataZoeMS
5+
---
6+
# INFO.CALCDEPENDENCY
7+
8+
[!INCLUDE[applies-to-query-only](includes/applies-to-query-only.md)]
9+
10+
Returns a table with information about each calculation dependency in the semantic model. This information helps you understand the model.
11+
12+
## Syntax
13+
14+
```dax
15+
INFO.CALCDEPENDENCY([<Restriction name>, <Restriction value>], ...)
16+
```
17+
18+
[!INCLUDE[parameters-for-info-dax-functions](includes/parameters-for-info-dax-functions.md)]
19+
20+
## Return value
21+
22+
A table with the following columns:
23+
24+
| Column | Description |
25+
|---|---|
26+
| [DATABASE_NAME] | The name of the semantic model. |
27+
| [OBJECT_TYPE] | The type of object. |
28+
| [TABLE] | The object's table name. |
29+
| [OBJECT] | The name of the object. |
30+
| [EXPRESSION] | The DAX formula of the object. |
31+
| [REFERENCED_OBJECT_TYPE] | The type of object this object references. The "Object" is dependent on this object. |
32+
| [REFERENCED_TABLE] | The referenced object's table name. |
33+
| [REFERENCED_OBJECT] | The referenced object's name. |
34+
| [REFERENCED_EXPRESSION] | The referenced object's DAX formula. |
35+
| [QUERY] | The query, if specified as a restriction. |
36+
37+
## Remarks
38+
39+
Can only be ran by users with write permission on the semantic model and not when live connected to the semantic model in Power BI Desktop. This function can be used in [DAX queries](/dax/dax-queries), and can't be used in calculations.
40+
41+
You can also call this DAX function with INFO.DEPENDENCIES.
42+
43+
## Example 1 - DAX query
44+
45+
The following DAX query can be run in [DAX query view](/power-bi/transform-model/dax-query-view):
46+
47+
```dax
48+
EVALUATE
49+
INFO.CALCDEPENDENCY()
50+
```
51+
52+
This DAX query returns a table with all of the columns of this DAX function.
53+
54+
## Example 2 - DAX query with restriction
55+
56+
The following DAX query can be run in [DAX query view](/power-bi/transform-model/dax-query-view):
57+
58+
```dax
59+
EVALUATE
60+
INFO.CALCDEPENDENCY("Query", "EVALUATE { [Orders] }")
61+
```
62+
63+
This DAX query returns a table showing the objects in the semantic model needed to run this specified DAX query. The restriction name of "query" is used with the value of a DAX query. This DAX query is getting the output of the measure named Orders.
64+
65+
If a query has double-quotes they can be escaped with another double-quote and you can optionally use a VAR to hold the value.
66+
67+
```dax
68+
EVALUATE
69+
VAR _query =
70+
"EVALUATE
71+
SELECTCOLUMNS(
72+
'Date',
73+
""Date"", [Date]
74+
)"
75+
RETURN
76+
INFO.CALCDEPENDENCY(
77+
"Query",
78+
_query
79+
)
80+
```

0 commit comments

Comments
 (0)