Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I think this is possible but I have no idea how to accomplish this. What I am trying to do is repeat a row. If you look under, the second screenshot below line description column, you will see headers like Salaires & Wages. They are always identified as LineSubSequence 0 and maybe this is the key. Is there a way to make the Salaries and Wages go on every single line blow the subaccounts.
So it would look like this:
| Before: | ||
| Salaries & Wages | ||
| 6005000000 | Productive Wages | |
| 6005050000 | Productive Premium | |
| 6025000000 | CTO Wages | |
| 6025050000 | CTO_COB Payout | |
| 6040000000 | Non-Productive Wages | |
| After. | ||
| Salaries & Wages | 6005000000 | Productive Wages |
| Salaries & Wages | 6005050000 | Productive Premium |
| Salaries & Wages | 6025000000 | CTO Wages |
| Salaries & Wages | 6025050000 | CTO_COB Payout |
| Salaries & Wages | 6040000000 | Non-Productive Wages |
assume the Line_Description column is the third column, then try this
NewStep=#table(Table.ColumnNames(PreviousStepName),List.Accumulate(Table.ToRows(PreviousStepName),{{},""},(x,y)=>if List.Contains({"0".."9"},Text.Start(y{2},1)) then {x{0}&{List.ReplaceRange(y,2,1,{x{1}&y{2}})},x{1}} else {x{0}&{y},y{2}}){0})
Just a forewarning I am super new so you will have to treat me like a tempermental 2 year old. This is a bit more complicated in terms of functions than I am used to. I am learning but just need a little bit of time please
If you can walk me through slowly I would be forever greatful please.
MahoneyPat.Yes Dynamically would be great. This is just a GL PL statement dump. It gets refreshed daily but the dataset comes out looking this way and I have no way to format it so the corresponding header is in row format. So if it can do it dynamically where it can find the header row Purchase Services, Utilities, Salaries and Wages etc. and put it next to the corresponding sub account would be awesome.
wdx223_Daniel ..You just blew my mind with all do respect. Can you walk me on how to apply this formula this is what I got so far but I get an error message.
1.
2.
Also the source is a SQL server database PMR_Reporting_ Work.
Sorry for the silly questions
Do you need to dynamically use the column name(s)? Or is it just the one prefix you need to add? if the latter, you can just convert that column to type text, and on the Transform tab, choose Format/Add Prefix, and enter Salaries & Wages to the pop-up box. If the former, you can dynamically grab the column name(s) from the Table.ColumnNames function applied to the previous step.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Just a forewarning I am super new so you will have to treat me like a tempermental 2 year old. This is a bit more complicated in terms of functions than I am used to. I am learning but just need a little bit of time please 🙂 If you can walk me through slowly I would be forever greatful please.
MahoneyPat.Yes Dynamically would be great. This is just a GL PL statement dump. It gets refreshed daily but the dataset comes out looking this way and I have no way to format it so the corresponding header is in row format. So if it can do it dynamically where it can find the header row Purchase Services, Utilities, Salaries and Wages etc. and put it next to the corresponding sub account would be awesome.
wdx223_Daniel ..You just blew my mind with all do respect. Can you walk me on how to apply this formula this is what I got so far but I get an error message.
1.
2.
Also the source is a SQL server database PMR_Reporting_ Work.
Sorry for the silly questions 😞
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!