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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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