You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Power BI文件夹源:获取各子文件夹最新更新文件的方法求助

Power Query: Retrieve Latest Modified File Per Folder (Preserving Binary & Attributes Columns)

I have a directory with subfolders named after months (May, Jun, July — I'll add August later) that store daily exported files. My goal is to:

  • Get the most recently modified file from each subfolder
  • Keep the Binary and Attributes columns for these files
  • End up with 3 (soon to be more) CSV files ready to expand

What I've Tried & Issues Encountered

  1. I first grouped by Folder Path and took the maximum Date modified value, but this stripped out the Binary and Attributes columns I need.
  2. I tried adding a max on Attributes or keeping all rows in the group, but neither approach gave me the full row for the latest file.
  3. When following a community solution approach, I hit this error:

    Function type value cannot be converted to Table type. Details: Value = [Function], Type = [Type]

My Current M Query Code

let
    Source = AzureStorage.DataLake(".../usersDailyData"),
    #"Filtered Hidden Files1" = Table.SelectRows(#"Sorted Rows", each [Attributes]?[Hidden]? <> true),
    #"Invoke Custom Function1" = Table.AddColumn(#"Filtered Hidden Files1", "Transformar archivo", each #"Transformar archivo"([Content])),
    #"Renamed Columns1" = Table.RenameColumns(#"Invoke Custom Function1", {{"Name", "Source.Name"}}),
    #"Removed Other Columns1" = Table.SelectColumns(#"Renamed Columns1", {"Source.Name", "Transformar archivo"}),
    #"Expanded Table Column1" = Table.ExpandTableColumn(#"Removed Other Columns1", "Transformar archivo", Table.ColumnNames(#"Transformar archivo"(#"Archivo de ejemplo"))),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Table Column1",{ Columns name here })
in
    #"Changed Type"

Could someone share a clear approach to solve this? Thanks in advance!

内容的提问来源于stack exchange,提问作者DR17

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 18:07:31