Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi all and good day, anyone can assist me on my table, is it ppossible to convert my table column in to row from PQ or calculated column.
from this
to this
| JOB No. | Article No | QTY | SOUTH | EAST | NNORTH |
| 21951135 | 1000255990 | 1 | 21951135 | ||
| 22481705 | 1001098319 | 1 | 22481705 | ||
| 22658569 | 1001142702 | 1 | 22658569 | ||
| 22702391 | 1001142702 | 1 | 22702391 | ||
| 22917777 | 1000052305 | 1 | 22917777 | ||
| 23162967 | 1001906138 | 1 | 23162967 | ||
| 23339018 | 1000954294 | 1 | 23339018 | ||
| 22584472 | 1000052452 | 1 | 22584472 | ||
| 22663497 | 1000062581 | 1 | 22663497 | ||
| 22732744 | 1001272166 | 1 | 22732744 | ||
| 22744357 | 1000103709 | 1 | 22744357 | ||
| 22744357 | 1000116567 | 1 | 22744357 | ||
| 22744357 | 1000148793 | 1 | 22744357 | ||
| 22868820 | 1001265761 | 1 | 22868820 | ||
| 22919967 | 1002590287 | 1 | 22919967 | ||
| 23242916 | 1002745560 | 1 | 23242916 | ||
| 50006071 | 1002278322 | 1 | 50006071 | ||
| 50022498 | 1002745560 | 1 | 50022498 | ||
| 21486352 | 1000898215 | 1 | 21486352 | ||
| 23257201 | 1000064372 | 1 | 23257201 | ||
| 23254473 | 1000056178 | 1 | 23254473 | ||
| 23130140 | 1000056612 | 1 | 23130140 | ||
| 23331150 | 1000056183 | 1 | 23331150 | ||
| 23332783 | 1000056183 | 1 | 23332783 | ||
| 50004633 | 1000056181 | 1 | 50004633 | ||
| 50069394 | 1000056181 | 1 | 50069394 | ||
| 23198390 | 1001074661 | 1 | 23198390 |
Solved! Go to Solution.
if you want to create a calculated column you can try this.
Proud to be a Super User!
Hi @AllanBerces
If you don't need the values of each column, you can create a custom column in pq
if [South] <> null then "South"
else if [East] <> null then "East"
else if [North] <> null then "North"
else null
if you want to create a calculated column you can try this.
Proud to be a Super User!
You can do this in Power Query without a calculated column.
Select the JOB No., Article No., and QTY columns, then right click and choose Unpivot Other Columns. That collapses SOUTH, EAST, and NNORTH into one Attribute and Value pair, where Attribute holds the region name. Filter the Value column to remove the blanks so only the populated region rows remain, rename Attribute to Region, and you can drop the Value column since it just repeats the JOB No.
If your blanks come through as empty strings instead of nulls, add a Replace Values step on those three columns to turn empty into null first, otherwise the filter will not catch them.
If this helped, a thumbs up and accepting the solution would be appreciated.
Best regards,
Shai Karmani
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 27 | |
| 23 | |
| 18 | |
| 18 | |
| 15 |
| User | Count |
|---|---|
| 53 | |
| 44 | |
| 42 | |
| 39 | |
| 34 |