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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors