Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Oliehoek
Frequent Visitor

How to get data from the lastest file?

Hi all,

I need to get the data from a file with the latest issue number. I can get a list of the files from the week and extract the issue number from it, but then how to I filter this out to get the highest issue number?

Oliehoek_0-1710159733943.png

In the above example I want to get only file issue 7 imported into my query, so I will need to filter for 7 in this example. But when issue 8 comes out, it needs to pickup the data from issue 8.

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @Oliehoek ,

 

How about this? 🙂

 

Before:

tackytechtom_1-1710160514402.png

 

 

After:

tackytechtom_0-1710160494970.png

 

Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyagkkzMGkOJi2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [YourColumn = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"YourColumn", Int64.Type}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([YourColumn] = List.Max(#"Changed Type"[YourColumn])))
in
    #"Filtered Rows"

 

The idea is to filter your column with the maximum of that exact column. Note "Changed Type" needs to be substituted with the previous step in your query.

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

1 REPLY 1
tackytechtom
Super User
Super User

Hi @Oliehoek ,

 

How about this? 🙂

 

Before:

tackytechtom_1-1710160514402.png

 

 

After:

tackytechtom_0-1710160494970.png

 

Here the code in Power Query M that you can paste into the advanced editor (if you do not know, how to exactly do this, please check out this quick walkthrough)

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyagkkzMGkOJi2UYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [YourColumn = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"YourColumn", Int64.Type}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each ([YourColumn] = List.Max(#"Changed Type"[YourColumn])))
in
    #"Filtered Rows"

 

The idea is to filter your column with the maximum of that exact column. Note "Changed Type" needs to be substituted with the previous step in your query.

 

Let me know if this helps 🙂

 

/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.