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
Hi Gurus,
I have two columns in PoweBI, I want to repeate category name and subcategoty name until there is a new value,
I want to know how to get it done in Power Query.
my current tabel and expected values are showen in the image below.
Thanks a lot for your help in advance
Solved! Go to Solution.
Ah, sorry, I didn't look carefully enough at your image, got too excited about fill down! lol
This function only works on 'null' values, so you'll need to select the column, click 'Replace Values'
Then use fill down.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@amalrio , There can be few ways.One can be.
Make all Test as null . In power Query -> Right click on Column and Replace "Test" with: null
Then use Fill Down - > https://www.excelcampus.com/powerquery/fill-down-blank-null-cells-power-query/
Replace remaining null with Test
@amalrio This is one of my favourite Power Query functions.
UPDATE: I forgot to mention that it only works on null values, then picks up next non null value, so first you must:
Select the column,
Click Transform tab,
click 'Replace Values'
Replace 'Test' with 'null' (spelling must be exact match).
Then click Fill > Down.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi @AllisonKennedy ,
thanks for the reply, but it did do anythin to to get me the expected table as in the image.
Ah, sorry, I didn't look carefully enough at your image, got too excited about fill down! lol
This function only works on 'null' values, so you'll need to select the column, click 'Replace Values'
Then use fill down.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@amalrio ,
There can be few ways.One can be.
Make all Test as null . In power Query -> Right click on Column and Replace "Test" with: null
Then use Fill Down - > https://www.excelcampus.com/powerquery/fill-down-blank-null-cells-power-query/
Replace remaining null with Test
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 44 | |
| 40 | |
| 33 | |
| 31 | |
| 23 |
| User | Count |
|---|---|
| 127 | |
| 116 | |
| 90 | |
| 73 | |
| 69 |