Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am new to Power BI query, and I would if there was a way to duplicate rows based on a value in a column within the same row.
From this
To something like this Medicine, Adult ED, 26 Very Good, 9 Good etc ...and then on to the next row with the same principle:
Division | Specialty | MonthYY | Experience |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Very Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Medicine | Adult ED | 01/04/2022 | Good |
Solved! Go to Solution.
Hi @Worthers
Highlight the columns I - O and rightclick and choose unpivot columns
Joe
Proud to be a Super User! | |
Date tables help! Learn more
Hi @Worthers,
Thanks for reaching out to the Microsoft fabric community forum.
As @ronrsnfld and @Joe_Barry both provided responses of their own to your query, please go through the responses and mark the helpful response as solution.
I would also take a moment to thank @ronrsnfld and @Joe_Barry, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi Joe, thank you so much I will give your suggestion a try and let you know
let
Source = Excel.CurrentWorkbook(){[Name="Table4"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{
{"Division", type text}, {"Specialty", type text}, {"Month", type date},
{"Very Good", Int64.Type}, {"Good", Int64.Type}, {"Neither", Int64.Type},
{"poor", Int64.Type}, {"very poor", Int64.Type}, {"Don’t Know", Int64.Type},
{"Response", Int64.Type}}),
//Optional in case you don't want to include the Response totals in your repeated final output
#"Removed Response Total" = Table.RemoveColumns(#"Changed Type",{"Response"}),
#"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Removed Response Total",
{"Division", "Specialty", "Month"}, "Experience", "Value"),
#"Repeats" = Table.ReplaceValue(
#"Unpivoted Other Columns",
each [Experience],
each [Value],
(x,y,z) => List.Repeat({y},z),
{"Experience"}
),
#"Removed Columns" = Table.RemoveColumns(Repeats,{"Value"}),
//Optional to remove rows with "0" responses
#"Remove Empties" = Table.SelectRows(#"Removed Columns", each not List.IsEmpty([Experience])),
#"Expanded Experience" = Table.ExpandListColumn(#"Remove Empties", "Experience")
in
#"Expanded Experience"
Partial results:
Thank you so much Ron, I will let you know how I get on.
Hi @Worthers
Highlight the columns I - O and rightclick and choose unpivot columns
Joe
Proud to be a Super User! | |
Date tables help! Learn more
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
10 | |
10 | |
8 | |
7 |