Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Heather_Jones
New Member

Create a table in Power BI Desktop with empty text field

Hi, hoping someone can help!

 

I have created a table in Power BI Desktop with dtaa pulled through from queried files and I want to add an additional column where I can manually enter text (I need a comments field that I can easily add to within desktop before it is published) - there is no need for others accessing the dashboard / report to enter text here. 

 

I know that I can always add a new data set and manually enter the comments into the background data but wondered if there was an easy way to do this on the report itself.

1 ACCEPTED SOLUTION
bblais
Resolver III
Resolver III

You could create a data table that has just the primary key of your data table and a comments field, and then create a relationship between the two.  From the Edit Query page, choose the "Enter Data" button on the Home ribbon.  Then name your table and the columns, something like ID and Comments.  You should have something similar to this:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQpJLS5RcM7PzU3NK1GKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Comments = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Comments", type text}})
in
    #"Changed Type"

Then whenever you want to comment on any record in your full data table, come to this new table in the query editor, click on the little gear to the right of the "Source" in Applied Steps, and add the row or change the comments on existing rows.  Then when you apply changes, the new comments will be available to you to use in your reports.

 

 

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @Heather_Jones,

 

Current power bi not support direct edit the current table. I think you can try to use bblais's point of view, it seems suitable for your requirement.

 

Below are some detail steps which has the same logic:

1. Create a new table with id and comment columns.

2. Build the relationship between these tables.

3. Add a calculate column to show the related comment on original table.

 

Tables:

Original Table: ID, Type

Comment Table: ID, Comment

 

Table Formula:

Comment Table = UNION(ROW("ID",1,"Comment","Not Good"),ROW("ID",2,"Comment","Good"))

 

Calculate column:

Comment = RELATED('Comment Table'[Comment]) 

Comment(Multiple) = CONCATENATEX(FILTER(ALL('Comment Table'),'Comment Table'[ID]='Original Table'[ID]),[Comment],",") 

 

Result:

Capture.PNGCapture2.PNG

 

Notice: You can add "ROW("ID",ID,"Comment","comment")" part to comment table formula to add the new comment.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
bblais
Resolver III
Resolver III

You could create a data table that has just the primary key of your data table and a comments field, and then create a relationship between the two.  From the Edit Query page, choose the "Enter Data" button on the Home ribbon.  Then name your table and the columns, something like ID and Comments.  You should have something similar to this:

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQpJLS5RcM7PzU3NK1GKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [ID = _t, Comments = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ID", Int64.Type}, {"Comments", type text}})
in
    #"Changed Type"

Then whenever you want to comment on any record in your full data table, come to this new table in the query editor, click on the little gear to the right of the "Source" in Applied Steps, and add the row or change the comments on existing rows.  Then when you apply changes, the new comments will be available to you to use in your reports.

 

 

Thank you for this. I am really asking Power BI to do something it was never designed to do so always knew it would have to be a hack.

 

This works perfectly though 🙂

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.