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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
viferenc
Helper II
Helper II

Need help mulitple line

Dear All,

 

I would like to ask fo your help.

 

I have in Table 1 a column with the following text.

Column A

Car

Bus

Airplane

Boot

 

In Table 2 I have column with the following text.

Column A

1

2

3

4

...

 

I would like to combine it power query that I have new table with the following way.

 

Column A        Column B

1                          Car

2                          Car

3                          Car

4                          Car

...                         Car

1                         Bus

2                         Bus

3                         Bus

4                         Bus

...                         Bus

1                       Airplane

2                       Airplane

3                       Airplane

4                       Airplane

...                      Airplane

1                      Boot

2                      Boot

3                      Boot

4                      Boot

...                     Boot

 

My goal is to show the text among each other ten times or hundred times with an extra column of the numbers startring always from 1 for each text.

 

Thank you for your help

 

Feri

 

 

 

2 ACCEPTED SOLUTIONS
ChrisMendoza
Resident Rockstar
Resident Rockstar

Add a Custom Column to Table2 as:

Table.Column(Table1,"Column A")

Expand the List to Rows to this:

image.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyaKsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ColumnA = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ColumnA", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Table.Column(Table1,"Column A")),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

@viferenc - I would recommend posting your follow-up issue as a new post. It is very likely someone else has a solution or better understanding of what you describe.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

3 REPLIES 3
ChrisMendoza
Resident Rockstar
Resident Rockstar

Add a Custom Column to Table2 as:

Table.Column(Table1,"Column A")

Expand the List to Rows to this:

image.png

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlSK1YlWMgKTxmDSBEyaKsXGAgA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [ColumnA = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"ColumnA", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Table.Column(Table1,"Column A")),
    #"Expanded Custom" = Table.ExpandListColumn(#"Added Custom", "Custom")
in
    #"Expanded Custom"





Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Dear Chris,

 

thank you for your help.

 

I had to modify a little bit, as I had to use more line.

See the formula below: (sorry it is in German)

 

let
Quelle = List.Numbers(1, 1000),
#"In Tabelle konvertiert" = Table.FromList(Quelle, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Hinzugefügte benutzerdefinierte Spalte" = Table.AddColumn(#"In Tabelle konvertiert", "Custom", each Table.Column(Table1,"ColumnA")),
#"Expanded Custom" = Table.ExpandListColumn(#"Hinzugefügte benutzerdefinierte Spalte", "Custom")
in
#"Expanded Custom"

 

The problem is when the query is running, it is loading millions of line although altogether it should be only 92000 lines. (1000*92) 

 

Is there any possibility to reduce the number of loading lines because at the end I have to use instead of 1.000 lines 1.000.000 lines

I calculated to load 92*1.000.000=92.000.000 lines and not billions of lines during the loading process. (I  have 92 different trucks, they run 1.000.000 km and for each km I´m planning to show average fuel consumption to be able to calculate for each transport the fuel consumption)

 

If there is any possibility to help me it would be great.

 

Thank you very much for your help.

 

Feri

@viferenc - I would recommend posting your follow-up issue as a new post. It is very likely someone else has a solution or better understanding of what you describe.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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