Forum Discussion
Create column based off todays date that does not change when appended to another table
I am trying to create a report/dashboard that will get data from salesforce objects, add a column(Date_Ran) of the date it was extracted, and then when the data is extracted again a new table is created and the first table is not updated. So basically a snapshot of the data when it was refreshed, anything that has changed a new table is created and then is appended to the fist table, having a column of Date_Ran with multiple dates.
So far I am able to get the data from salesforce objects, I created a custom column with function
= DateTime.Date(DateTime.LocalNow()) which gives me the current date(10/14). I unselect "Include in report refresh".
When I run the refresh again(a few days later) it gives me the data with current date on it, unselect "Include in report refresh" but when I try to append these two tables together, the column Date_Ran now has all the records with the same date.
Im assuming it is because I am using this function = DateTime.Date(DateTime.LocalNow()).
Is there a better way or different function that I can use that will allow me to only grab the date it was refreshed and not change the dates once appended?
2 Replies
- AnonymousNot applicable
Hi Anonymous ,
May I know what the custom column are used to? If we can consider to add this column in the data source?
Best Regards
- AnonymousNot applicable
The custom column is just used to create the "Date_Ran" column, just so we have a timeframe of when the data was pulled. So if ran today I would have a table with a column of 10/26/2022, not include in refresh report. Then when i run the refresh lets say tomorrow, another table would should up with 10/27/2022.
I know PowerBI doesnt work like a data warehouse so I am trying to create a way where we can access data from certain points of time and create trends throughout the week/month.