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
rdevlin
Regular Visitor

Load table with calculated formula intact

I have, for example, a table with two columns in excel. The first is a text field and the second is a calculated column:

     A                 B

1   Name         Calculated Column

2    Mr X           =A2

 

I then query this table via power query and load the results back to another worksheet. The resulting table has two text columns.

    A                   B
1 Name           Calculated Column
2 Mr X              Mr X

 

Can you clarify if it is possible to actually return the formula as before ( ie so the formula  = A2 is in the new table's cell B2 replicating the original calculated column) and not return the result of the calculated column as hard coded text. If yes, how?

 

Thanks 

 

1 ACCEPTED SOLUTION

Thanks for your help on this but formula.text still doesnt bring the column in as a calculated column.

 

Looking into it all further today I have found a workaround solution - if I  (i) initially just query the first column, (ii)  load it back into the workbook as a new table, (iii) then insert a new column to the right in the new table and (iv) then add the formula in the new column it creates a calculated column which refreshes everytime the original table data is updated and the power query refreshed!

 

 

View solution in original post

2 REPLIES 2
watkinnc
Super User
Super User

You could try the Formulatext function in Excel before you load it to Power Query. Then you are getting the actual formulas.

I’m usually answering from my phone, which means the results are visualized only in my mind. You’ll need to use my answer to know that it works—but it will work!!

Thanks for your help on this but formula.text still doesnt bring the column in as a calculated column.

 

Looking into it all further today I have found a workaround solution - if I  (i) initially just query the first column, (ii)  load it back into the workbook as a new table, (iii) then insert a new column to the right in the new table and (iv) then add the formula in the new column it creates a calculated column which refreshes everytime the original table data is updated and the power query refreshed!

 

 

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

Top Solution Authors
Top Kudoed Authors