The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi
I have a problem and I can't seem to find a similar problem here.
I have a folder with different XML files, these are marked in the filename with their date and time of extraction. These files are extracted several times a day. Now, I don't have problem with getting the files for the newest date (today), what I am struggling with is getting the newest file on today. The format of the date is DDMMYY, and for the time it is HHMMSS
Example:
"name1_120220_150007"
"name2_130220_010014"
"name1_130220_080018"
"name3_130220_010022"
"name1_130220_010110"
"name2_130220_120817"
Now, the name1 files have the same type of data, while name2 and name3 have different type of data. All these names have multiple extractions per day resulting in the filenames in the example.
So for the example above I want to update my PowerBI file with the files "name1_130220_080018", "name2_130220_120817" and "name3_130220_010022". Is there a way to get the latest file maybe by picking the file with the "highest" number after the last _?
Hi @Anonymous ,
Add a custom column with the following code:
Text.BeforeDelimiter([FileName], "_")
Then do a group by this new colum and select the maximum value of the FileName column this will return only the list of files you need. then use this list to treat the files I'm assuming you are using a custom function to treat the files.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português