Forum

Sort Machine Name b...
 
Notifications
Clear all

Sort Machine Name by most recent date

6 Posts
2 Users
0 Reactions
85 Views
(@moshe_arama)
Posts: 14
Eminent Member
Topic starter
 

Hi ,

I have a problem :

i get files from folder that update in a new file every day

i want to show in the table only the recent rows by "Machine Name"

Please look at the pictures and get a sense of what i mean.

picture_2.PNG

picture_1.PNG

 
Posted : 01/02/2023 5:48 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Moshe,

You can do this by creating a query (from blank) that gives you today's date using Date.From(DateTime.LocalNow()))

You can then merge your data table with this date using an inner join to give you just the rows from today.

See attached file.

Regards

Phil

 
Posted : 01/02/2023 6:10 am
(@moshe_arama)
Posts: 14
Eminent Member
Topic starter
 

Hi thanks for your answer

But i dont want only the today rows

I want the most resent i mean

Maybe there is a machine that her last active time was in 28/12/2022

i want to see that .

 
Posted : 02/02/2023 2:27 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Moshe,

You need to be explicit about what you mean by 'recent'.

Please give an example of what you want as a result based on some sample data you provide. The images you provided don't explain what it is you are actually looking to do.

Regards

Phil

 
Posted : 02/02/2023 3:04 am
(@moshe_arama)
Posts: 14
Eminent Member
Topic starter
 

Hi Phil ,

if you want i can call you and explain more .

but the main idea is to show the last file that i upload to the folder ,

because the main file pull every day from folder new file that load ( picture_1)

i want after refresh i will see only the data of the last file .

Picture_1.PNG

 
Posted : 02/02/2023 10:26 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Moshe,

If you are loading and combining all the files from the same folder then you should have a main query and a bunch of other Helper Queries.

To load only the latest file's data, in your main query, select the Source step, you should see something like this

moshe1.png

Note the Date Created column. Click on the Down Arrow in the column header, then click on Date/Time Filters and then click on Is Latest.

moshe2.png

PQ will ask you to confirm that you want to insert a step, say yes. This new step will only list the most recently created file. The rest of the query steps can then continue working on the data just from that file.

Regards

Phil

 
Posted : 03/02/2023 7:23 am
Share: