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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
satish_patel
New Member

How to save a column value from salesforce report to a new column ????

Hi fellows,

 

I am stuck. I am using salesforce report as a data source and I have a date column(say cl_1) which is coming from the salesforce report.

Now, I want to save this date(cl_1) locally in a new column(say cl_2) and it should be updated once the value in cl_1 changes. The update should save the old value of cl_1.

 

How can I achieve this?

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @satish_patel 

According to your description, you want to create a new column to get the old value of cl_1 if it has refreshed.

For this , Power BI, data refresh is to directly overwrite all data, and your old data cannot be retained.

If you want to keep the old data, then you can try to export your data to get the old data. Secondly, there is DAX append method, You need to make sure you get new data only,See if these blogs can help:
Keep The Existing Data In Your Power BI Dataset And Add New Data To It Using Incremental Refresh - C...

Incremental Load in Power BI using DAX UNION – The BIccountant

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

View solution in original post

2 REPLIES 2
Mrxiang
Helper II
Helper II

To accomplish this, you can use a formula in your local data source (CSV, Excel, etc.) to calculate the new value for cl_2 based on the value of cl_1, and then update the local copy of the data. Assuming you have a date column in your Salesforce report called "cl_1", and you want to create a new column called "cl_2" in your local data source with the formula: cl_2 = CASE WHEN cl_1 = '2022-01-01' THEN '2021-12-31' ELSE cl_1 END Then, in your Salesforce report, whenever you update the value of the "cl_1" field, the formula in your local data source will automatically recalculate and update the value of "cl_2" to reflect the change. You can also use the "WHEN" function in the formula to add more conditions, like if the value of "cl_1" is between '2022-01-01' and '2022-02-01', then the new value of cl_2 would be '2022-01-01'.

v-yueyunzh-msft
Community Support
Community Support

Hi , @satish_patel 

According to your description, you want to create a new column to get the old value of cl_1 if it has refreshed.

For this , Power BI, data refresh is to directly overwrite all data, and your old data cannot be retained.

If you want to keep the old data, then you can try to export your data to get the old data. Secondly, there is DAX append method, You need to make sure you get new data only,See if these blogs can help:
Keep The Existing Data In Your Power BI Dataset And Add New Data To It Using Incremental Refresh - C...

Incremental Load in Power BI using DAX UNION – The BIccountant

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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