could you elaborate and provide an example? I'm not 100% clear on what you need yet
Hi Miguel!
Yesterday I saw your post on excelguru and it was amazing! (
Transforming Data with Power QueryThe Ken Puls (Excelguru) Blog)
If you won't find an answer so it doesn't exist yet I suppose. =)
So task is very simple on a screen, but difficult to deal with by using M language. Or I just don't know it on the proper level yet.
Image that we have a huge table like:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]
column1
[/TD]
[TD]
column2
[/TD]
[TD]
column3
[/TD]
[TD]
column4
[/TD]
[TD]
column5
[/TD]
[TD]
column6
[/TD]
[TD]
column7
[/TD]
[TD]
column8
[/TD]
[TD]
column9
[/TD]
[TD]
column10
[/TD]
[TD]
N
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]qqqq
[/TD]
[TD][/TD]
[TD]wqwq
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]qwe
[/TD]
[TD][/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD]sdfwe
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]ert
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]FFF
[/TD]
[TD]aaa
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]84
[/TD]
[TD]979
[/TD]
[TD]2
[/TD]
[TD]5699
[/TD]
[TD]888
[/TD]
[TD]999
[/TD]
[TD]978
[/TD]
[TD][/TD]
[TD]gfssa
[/TD]
[TD]N
[/TD]
[/TR]
[TR]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[TD]N
[/TD]
[/TR]
</tbody>[/TABLE]
So is it possible to Fill Down only columns that do not have BLANK at least in one of the first two rows (in this example it is 1,5,6,8,10)? Or any other function.
One thing that I didn't find in M language is a functions by condition...
Another example:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]
Column1
[/TD]
[TD]
Column2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Round
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]Flat
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
What I want to do here is check whether Column 1 is not BLANK and copy a text to the same Column2 row from next down Column2 row if it is true.
Like:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]
Column1
[/TD]
[TD]
Column2
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Round
[/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Apple
[/TD]
[/TR]
[TR]
[TD]Flat
[/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Orange
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
To be honest, I left this tasks for a while but it is still useful to understand how to solve problems like this.