[PowerBI/PowerQuery] Function that translates the documentation attached to a function definition into Markdown text
✓ Published0🌍 Public
HHugoberry
Last edited Mar 7, 2018
Created on Feb 12, 2018
This example demonstrates a Power Query function that converts the documentation embedded in a function’s type metadata into a Markdown-formatted text block. It first retrieves the function from Power BI’s shared namespace, then extracts fields such as description, long description, category, and examples from the `Value.Metadata` of the function’s type. The code handles missing fields with `try`/`otherwise`, and uses `Text.Trim`, `Lines.ToText`, and `List.Transform` to assemble a template with headers and code fences. The final output is a Markdown document suitable for gallery display, relying solely on the function’s own metadata as the data source.
AI-generated description