We have a table showing data like OpprId, revenue, area region where table is sorted based on highest revenue. This table was built using power query. Here user wants to add a new column and make it as status column and save the status. This status should be visible on refresh of the report connection. So is there any custom column formula to save the entered text, and this status should be in sink with OppId as in future new OppId's may be added so the sort order may change.
OppId   ServiceLineServiceRevenueCUS    Status 
1       101584729.9                     Good
2       62272199                        let u know
3       11000000                        dfghd
4       9000000                         fdgdf
5       8200000                         fdgf 
6       7500000                         fgdf 
7       6000000                         fgdf
8       5650000 
Edit 29/11/2016: a video is now available to clarify this solution. The code is a little bit different from the code below; basically it's still the same solution.
On another forum I answered a similar question. First the input data (first name and last name) was read and output by a Power Query query. A column was added to that output (Age - manually maintained). Now I created a query that reads data from the Input table, left joins it with the Output table and write the results back to the Output table. So the Output table is both input and output from that query.
let
    Source1 = Excel.CurrentWorkbook(){[Name="Input"]}[Content],
    Typed1 = Table.TransformColumnTypes(Source1,{{"Last Name", type text}, {"First Name", type text}}),
    Source2 = Excel.CurrentWorkbook(){[Name="Output"]}[Content],
    Typed2 = Table.TransformColumnTypes(Source2,{{"Last Name", type text}, {"First Name", type text}, {"Age" , type number}}),
    Renamed2 = Table.RenameColumns(Typed2,{{"Last Name", "Last"}, {"First Name", "First"}}),
    Join1and2 = Table.Join(Typed1,{"Last Name", "First Name"},Renamed2,{"Last", "First"}, JoinKind.LeftOuter),
    Removed = Table.RemoveColumns(Join1and2,{"Last", "First"})
in
    Removed
Situation:
Procedure:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With