Skip to content

Commit d548752

Browse files
committed
Updated JSDoc use for DAX functions
1 parent 9e21df6 commit d548752

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

_mydocs/dax-style/dax-naming-conventions.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,21 @@ FUNCTION CelsiusToFahrenheit = ( temperature: DOUBLE ) =>
121121
Here is a possible technique inspired by the JSDoc standard (https://en.wikipedia.org/wiki/JSDoc) that can be used in September 2025 version of Power BI Desktop and shows the parameters in the function description:
122122
```
123123
/// Convert from Celsius(°C) to Fahrenheit(°F)
124-
/// @param temperature – The temperature in Celsius
124+
/// @param {decimal} temperature – The temperature in Celsius
125125
/// @returns The temperature converted to Fahrenheit
126126
FUNCTION CelsiusToFahrenheit = ( temperature: DOUBLE ) =>
127127
( temperature * ( 9 / 5 ) ) + 32
128128
```
129129

130-
Here is the technique adopted for parameters by Tabular Editor 3 in September 2025 release:
130+
These would be the rule to follow in DAX to use JSDoc-style comments:
131+
- Use `///` to start a comment block for a function.
132+
- Use `@param` to describe each parameter of the function. You can also use `@arg` and `@argument` as parameter tags.
133+
- _(Optional)_ After `@param`, you may include the type of the parameter within curly braces `{}`.
134+
- The word after `@param` and the optional type is the name of the parameter being described.
135+
- _(Optional)_ After the parameter name, use a dash `` (en dash) to separate the name from its description.
136+
- Use `@returns` to describe the return value of the function. You can also use `@return` as a synonym.
137+
138+
Here is the technique adopted for parameters by Tabular Editor 3 in September 2025 release, but we expect Tabular Editor 3 to support the JSDoc-style comments in future releases:
131139
```
132140
/// Convert from Celsius(°C) to Fahrenheit(°F)
133141
FUNCTION CelsiusToFahrenheit = (

0 commit comments

Comments
 (0)