Forum Discussion

roncruiser's avatar
roncruiser
Post Patron
5 years ago
Solved

Index Column skipping every 8th Row

I'm unsure how to index a column by skipping every 8 row.  Maybe that's not even the correct way to do this.

 

I received some data that's too late to change in terms of a format in the near term.

 

The parameter column contains stages as indicated by the Stage(Need) Column.  Each successive midp and DQDCC group combined forms a single stage. I need the Stage(need) column but not sure how to skip every n Rows.  In this example it would be skipping every 8th row but some other files it might be skipping every 16 rows.

 

Any help appreciated.  I'm stumped.  Hopefully it's something simple.

 

Thank you...

 

Channel
(Have)
Parameter
(Have)

Value

(Have)

Stage

(Need)

Index Row Skipping
[0][0][0]midp1400
[0][0][1]midp140 
[0][1][0]midp140 
[0][1][1]midp140 
[0][0][0]dcd-210 
[0][0][1]dcd-190 
[0][1][0]dcd-190 
[0][1][1]dcd-140 
[0][0][0]midp2111
[0][0][1]midp211 
[0][1][0]midp211 
[0][1][1]midp211 
[0][0][0]dqdcc-191 
[0][0][1]dqdcc-181 
[0][1][0]dqdcc-161 
[0][1][1]dqdcc-151 
[0][0][0]midp2522
[0][0][1]midp252 
[0][1][0]midp252 
[0][1][1]midp252 
[0][0][0]dcd-172 
[0][0][1]dcd-182 
[0][1][0]dcd-172 
[0][1][1]dcd-162 
[0][0][0]midp2733
[0][0][1]midp273 
[0][1][0]midp273 
[0][1][1]midp273 
[0][0][0]dcd-163 
[0][0][1]dcd-213 
[0][1][0]dcd-163 
[0][1][1]dcd-183 
[0][0][0]midp2844
[0][0][1]midp284 
[0][1][0]midp284 
[0][1][1]midp284 
[0][0][0]dcd-194 
[0][0][1]dcd-204 
[0][1][0]dcd-184 
[0][1][1]dcd-154 
  • roncruiser check attached solution, there are few tables, just ignore, take a look at Stage table and it has the transformation steps to achieve the goal, tweak it as you see fit.

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

3 Replies

  • roncruiser check attached solution, there are few tables, just ignore, take a look at Stage table and it has the transformation steps to achieve the goal, tweak it as you see fit.

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.

  • parry2k 

    Thank you for the fast response.  Immediately useful!

     

    I have to study how you modified the index to skip rows.  Not quite sure upon first glance.  I'm getting better at M code but some seemingly simple stuff just stumps me.

     

    Thanks again!

  • roncruiser glad it worked out, if anything I can explain, please ask.

     

    Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to 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.