cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frixel
Post Partisan
Post Partisan

Look every day to another file

Hi all,

 

Is it possible to have powerBi look every day at a new file  to count how many lines there are in that file?

The file`s has a different name every day similar to the current date as shown below.

 

1.png

1 ACCEPTED SOLUTION
amitchandak
Super User IV
Super User IV

@Frixel , refer this to get a lastest file

https://medium.com/@wkrzywiec/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4...

 

In power Query you can use Table.RowCount to count the rows

 

https://docs.microsoft.com/en-us/powerquery-m/table-rowcount



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

11 REPLIES 11
amitchandak
Super User IV
Super User IV

@Frixel , refer this to get a lastest file

https://medium.com/@wkrzywiec/getting-data-from-the-latest-file-in-a-folder-using-power-query-51dfa4...

 

In power Query you can use Table.RowCount to count the rows

 

https://docs.microsoft.com/en-us/powerquery-m/table-rowcount



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Hi @amitchandak  & @FarhanAhmed 

 

thanks for your help i will try it.

But what to do here?

 

1.png

Click on "Transform Data" and it will open up Power Query Editor







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




@FarhanAhmed & @amitchandak 

 

Now i get this 😥

 

1.png

You need to install Excel Engine Driver installation on your machine.

 

you can download the driver and install it from

 

https://www.microsoft.com/en-us/download/details.aspx?id=54920

 

or you can also follow the link in error to download driver.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




@FarhanAhmed & @Syndicate_Admin

I can`t install that driver 😂

I have try the 64 bit and also the 32 bit.

1.png2.png

This is my office version. (work laptop)

3.png

And this is the laptop

4.png

Hi @FarhanAhmed & @Syndicate_Admin

Now i Can install the driver with this solution.

I have now install the 64 bit version and now i have a connection.

Hi @FarhanAhmed  & @amitchandak 

 

Now i have this error, is that normal?

 

1.png

Haven't faced it before 

 

see if this could help

 

https://community.powerbi.com/t5/Desktop/External-table-is-not-in-the-expected-format/td-p/153986

https://stackoverflow.com/questions/63556733/how-can-power-query-be-changed-to-handle-external-table...

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




The file is saved as html page so i choise that in powerbi and the the connection is solved.

 

Thanks for your help.

FarhanAhmed
Super User II
Super User II

You can get it thru

 

1- Get Data using Folder, this will bring contents of files in that folder

2- Filter the extension to show on "xls" files

3- Then in Date Created filter using Date Filters to get the Latest file. This will always bring the latest file from folder

 

LatestFile.png

 

4- Expand the content of the file, make sure that you have consistent data on those files to perform next steps.

Hopefully this will help you on getting the data required.







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors