Check Multiple Columns For Condition And Duplicate Rows

sajidali_sa

New member
Joined
Aug 21, 2020
Messages
2
Reaction score
0
Points
0
Location
Khi
Excel Version(s)
365
Hi All,
I am very new to Power BI and need help in following...
I am running a query based on answer in this thread to copy rows based on a condition...

HTML:
let
    CN = [#"Column4"]
in
     if Text.Length(CN)=11 and Value.Is(Text.Start(CN,4),type text) and Value.Is(Number.FromText(Text.End(CN,7)),type number)
    then List.Repeat({CN},13)
    else {CN}

But its checking this condition in only one column i.e. Column4 while I want it to check condition on Column3, Column4 and Column5. Any help please?
 
Can you supply a short sample data set with a before and after of what you're trying to accomplish? There are a couple of different directions this could go, depending on your desired output.
 
Yes sure.
Actually data looks like this

2020-08-21_22-25-15.jpg

This data is extracted from a lot of PDFs so its messy. And columns of my interest are G, H, and I. If length of any of cell in these columns is 11 AND its first four of content of same cell are TEXT and Last 7 are numbers then I need to copy the entire row (from column A to Z) 13 times.

Another thing that is in my mind is if we remove all blanks from column A to Z then all of these Columns will come to Column F and then we can use the query that I mentioned earlier in my post to copy rows 13 times if conditions are met.

Which ever is easy for you to understand :)
 
Back
Top