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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Nico_Schulze
Frequent Visitor

Use every seventh row

Hey yall, 

 

I have an Column called "A" that has 100 Entries. In Column "B" I want to only use every seventh ROW, so ROW 7,14,21... 

 

Does someone know how I can do this? 

 

Thnak you very much for your help! 

 

Regards 

Nico

8 REPLIES 8
slorin
Super User
Super User

slorin
Super User
Super User

Hi

= Table.AlternateRows(Source,0,6,1)

Stéphane 

Hey @slorin , 

 

your solution seems easy. But when I try to write it down in my Power BI, it doesnt work. The function Table.AlternativeRows doesnt exist. What am I doing wrong? 

 

Thnaks for the help!

 

Regards

Nico

 

PhilipTreacy
Super User
Super User

Hi @Nico_Schulze 

 

Download example PBIX file

 

try this

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Jcy7EYAwEAPRXi4mYA/MpxaP+28DRps8Rdo5i1rbrI5HPOOIV7zjE9/I7vjGO/4xgAVMYAMjWGkr/VfWBw==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [A = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"A", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type),
    #"Added Custom" = Table.AddColumn(#"Added Index", "B", each if Number.Mod([Index], 7) = 0 then [A] else "")
in
    #"Added Custom"

 

 

What you need to do is add an Index column and then use Number.Mod to check if the Index for that row leaves 0 remainder when divided by 7.  If so then use the value from A else use a ""

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

@Nico_Schulze 

 

What I mean is, in Column B rows 1 to 6, what do you want there?  A blank?

 

If you are adding another column, it has to have the same number of rows as all the other columns, so what do you put in the rows of that column from 1 to 6, 8 to 13 etc?

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hey @PhilipTreacy

 

sorry for the misunderstanding. Yes a Blank would be awesome! 

 

Regards 

Nico

PhilipTreacy
Super User
Super User

Hi @Nico_Schulze 

 

So what do you have in the other rows i.e. 1-6, 8-13 etc?

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Hello Philip, 

 

in the other ROWS I also have Entries but they are not relevant for me. I only want to use every seventh Row. 

 

Regards

Nico

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors