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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
LukeReds
Helper II
Helper II

How to extract elemens from a list using List.Alternate

Hi to everyone,

i have this list, numbers from 1 to 12 {1..12}, 

for extracting 1,4,7,10 i use = List.Alternate(Source,2,1,1) 

for extracting 3,6,9,12 i use = List.Alternate(Source,2,1,0)

 

How can i extract 2,5,8,11?

 

Thank you!

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

= pls try this code

= List.Alternate(List.Range({1..12},1),2,1,1)

 

View solution in original post

6 REPLIES 6
LukeReds
Helper II
Helper II

ts correct i was searching a way for using onlyList.Alternate, but its not possible

Ahmedx
Super User
Super User

= pls try this code

= List.Alternate(List.Range({1..12},1),2,1,1)

 

thank you!

LukeReds
Helper II
Helper II

hi @dufoq3  thank you for your answer, i tried it but i got 1,2,5,8,11

Have i to add a step that exclude the first number? I need only 2,5,8,11

 

I'm not sure what are you talking about. There is also screenshot with correct result...


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

dufoq3
Super User
Super User

Hi @LukeReds 

List.Skip(List.Alternate({1..12}, 2,1,2))

 

dufoq3_0-1721402876995.png

 


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors