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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
wiktorius1984
Regular Visitor

Split rows

Hi, I would like to split you know a number of rows, A row must be split so many times that the result in its row is always 0.25. The data jump in a cell is always 0.25 so 0.25 then 0.5 then 0.75 up to 12,

one row has for example 0.5 in its column, I want to split it into two identical rows that have custom values of 0.25

textvalue
example10,5

result

textvaluecustom_value
example10,50,25
example10,50,25


second example a row has value 4 I want it to be divided into 8 rows

textvalue
example24

result

 

textvaluecustom_value
example240,25
example240,25
example240,25
example240,25
example240,25
example240,25
example240,25
example240,25

 

do you have any idea how to do this

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @wiktorius1984 ,

I have a question about how you calculate the number of rows however the first approach since you always want the same value do the following:

  • Add a custom column with the following code:

 

Text.Start( Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25),

Text.Length(Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25))-1)

Only question here is about the last part of the syntax that should be chjange to give you the correct number of rows (not understanding why 4 gives you a result of 8 rows).

 

 

  • Do a split column by rows:

MFelix_0-1620898419519.png

 

final result and code below:

MFelix_1-1620898445196.png

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcq1IzC3ISTU0UNJRMtAzVYrVgYsZAYVMlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [text = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"text", type text}, {"Value", type number}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Start( Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25),

Text.Length(Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25))-1)),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Added Custom", {{"Custom", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Custom"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Custom", type number}})
in
    #"Changed Type1"

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @wiktorius1984 ,

I have a question about how you calculate the number of rows however the first approach since you always want the same value do the following:

  • Add a custom column with the following code:

 

Text.Start( Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25),

Text.Length(Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25))-1)

Only question here is about the last part of the syntax that should be chjange to give you the correct number of rows (not understanding why 4 gives you a result of 8 rows).

 

 

  • Do a split column by rows:

MFelix_0-1620898419519.png

 

final result and code below:

MFelix_1-1620898445196.png

 

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcq1IzC3ISTU0UNJRMtAzVYrVgYsZAYVMlGJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [text = _t, Value = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"text", type text}, {"Value", type number}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Text.Start( Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25),

Text.Length(Text.Repeat( Number.ToText(0.25) & "," , [Value]/0.25))-1)),
    #"Split Column by Delimiter" = Table.ExpandListColumn(Table.TransformColumns(#"Added Custom", {{"Custom", Splitter.SplitTextByDelimiter(",", QuoteStyle.Csv), let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "Custom"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Split Column by Delimiter",{{"Custom", type number}})
in
    #"Changed Type1"

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



thanks for help, you are right in case of value 4 there must be 16 rows 🙂 thx

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Solution Authors
Top Kudoed Authors