Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Dynamically keep last entry in table & expand section

Hello, I am connecting to a folder with several files. There is a new file added each week to this folder. I'd like to only source data from the most recent file updated. I'll only need to expand the "Transform File" column for this most recent entry. I added an index column and was thinking before I expand the "Transform File" column, I will dynamically keep only the max Index. Can someone please advise how to do this?

 

  • Anonymous click advanced editor and add a filter step with following M expression, assuming this is the last step

     

    #"Last Row" = Table.SelectRows(<previous query step here>, each [Index] = List.Max(<previous query step>[Index]))
    in
    #"Last Row"

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

     

1 Reply

  • Anonymous click advanced editor and add a filter step with following M expression, assuming this is the last step

     

    #"Last Row" = Table.SelectRows(<previous query step here>, each [Index] = List.Max(<previous query step>[Index]))
    in
    #"Last Row"

     

    I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!

    Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.