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
shamilka
Frequent Visitor

Need to add a history table for each data refresh

Hi,

 

I need to add a history table with a data refresh date column. So for each data refresh, the refresh date for each row has to be added in a refresh date column. There should not be any duplicates if the coped row is already there. Also, I need to count the number of open days by getting todays date into consideration well as the refresh date. Please check the input as well as desired output table below. 

 

It would be ideal if I can copy data to a new table since I would be able to have a table for current data as well as history data.

 

Input

StatusPNSNBatch noQTYP
InstallABC430011141XXA
RemoveABC320011151XXB

 

Output 

 

StatusPNSNBatch noQTYPRefresh dateOpen days
InstallABC430011141XXA17/04/20240
RemoveABC320011151XXB10/04/20247
1 REPLY 1
dufoq3
Super User
Super User

Hi @shamilka, you can't store current date but you can do that if your source file contains such date (in filename or body) - it doesn't matter. It can be done in power query but to be honest it is not ideal.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Top Kudoed Authors