Forum Discussion
Can I dyanmically set Column Description in Power Query
- 1 year ago
Hi rpiboy_1 ,
Thanks for the feedback. You are correct. Using tooltips to describe metadata can be a limitation, and defining metadata through scripting or manual effort is a rather complex task. Unfortunately, Power Query does not have an intrinsic method of defining metadata descriptions directly.
Your idea to let Power BI inherit metadata from Power Query or allow dynamic descriptions is good. Since this is not currently supported, I suggest submitting a feature request on the Power BI Ideas Forum. This will bring attention to the need for this enhancement.
You can submit your idea here: Microsoft Fabric Ideas.
If my response solved your query, please mark it as the Accepted solution to help others find it easily. And if my answer was helpful, I'd really appreciate a 'Kudos'.
Hi, provide sample data and expected result please.
- rpiboy_11 year agoHelper V
As requested, example data.
Data Table:ID Name Value One Value Two 1 Acme 78.33 53 2 Contoso 44.56 87 3 Zebra 22.47 39 Column Table
Internal.ID Name DataType Description ID ID number unique identifier obj-name Name text name of object obj-val1 Value One decimal number some description of this property obj-val2 Value Two number some description of this property different from Value One
I already dynamically rename and properly type the columns in the Data Table from the Column Table. What I'd like to do is dynmically set the Column Description in the Data Table based on the Description Column of the Column Table. The List returned by Table.ColumnNames(#"Data Table") will match the list #"Column Table"[Name] since the name(s) used in Data Table originate from Column Table in the first place.The question(s);
- Is the Description that is visible in Power BI a meta data value that can be set from Power Query?
- If it is what would a function start to look like to iterate over the columns in the Data Table and apply the meta data as defined in the Column Table
- V-yubandi-msft1 year agoCommunity Support
Hi rpiboy_1 ,
Thank you for reaching out to the Microsoft Fabric Community with your query. The description you see in Power BI is indeed metadata, but unfortunately, you cannot set it directly from Power Query. Power Query is primarily for data transformation and loading, while setting descriptions (metadata) for columns is done in the model layer of Power BI.
While you can't set the description directly in Power Query, you can prepare your data to make it easier to set the metadata manually or programmatically in Power BI.
Here's a general approach:
- Manual Approach (For Small Models):
- This method is suitable for smaller models where you can manually set the column descriptions in Power BI Desktop.
- Store Metadata in a Separate Table:
- Create a separate table in Power BI that contains the column names and descriptions.
- Use this table to dynamically display descriptions in report tooltips.
- If using Power BI Premium or PPU, you can update column descriptions programmatically.
If my response solved your query, please mark it as the Accepted solution to help others find it easily. And if my answer was helpful, I'd really appreciate a 'Kudos'.
- Manual Approach (For Small Models):