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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Daniel28-DH
Helper I
Helper I

Second Last Value threw columns

Hello, I have a list from which I need to return the last value of a column.
This works with the following formula.

List.Last(List.RemoveItems(Record.ToList(_),{""}))

Now I wonder if it is also possible to return the second to last value in this way?

Can someone help?

1 ACCEPTED SOLUTION
jbwtp
Memorable Member
Memorable Member

Hi @Daniel28-DH,

 

Yes, you can. But in a slightly differnt fashion, e.g. :

let
    Source = {1..9},
    OneBeforeLast = Source{List.Count(Source)-2}
in
    OneBeforeLast

Cheers,

John

View solution in original post

1 REPLY 1
jbwtp
Memorable Member
Memorable Member

Hi @Daniel28-DH,

 

Yes, you can. But in a slightly differnt fashion, e.g. :

let
    Source = {1..9},
    OneBeforeLast = Source{List.Count(Source)-2}
in
    OneBeforeLast

Cheers,

John

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors