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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mm44
Frequent Visitor

Create multiple columns from data in single column

Good evening

 

I have searched for a solution but have unable to find one.  I feel this should be a easy answer but being new to Power Bi I am unable to come up with a solution.

 

I have the below sample dataset

ItemWarehouseReorder TypeQty
ABC1Standard10
ABC1Customer5
ABC2Standard25
DEF2Standard15
GHI2Sales20

 

 

I need to return a datatable with a distinct list of Item and Warehouse codes along with columns summing the different reorder types.  Example of the expected result below

ItemWarehouseStandardCustomerSales
ABC11050
ABC22500
DEF21500
GHI20020
2 ACCEPTED SOLUTIONS
Seanan
Solution Supplier
Solution Supplier

Hi @mm44 

Under the Home tab in PBI Desktop click the transform data button. From here click on the Reorder tab so that it is hightlighted.

NVIDIA_Share_VDptifBRUo.png

 

 

 

In the transform tab click pivot column and set the value to TypeQty. Click advanced options and set the aggregate value function to Don't Aggregate. 

Your table will then appear as you want it.

6a9854d0-bb93-4543-a00d-0bf276d60617.png

NVIDIA_Share_fYhAWfA8Yb.png

*Update*

I forgot to mention, if you wish to replace the null values with 0.

Select all three columns, right click on one of them and click replace values. Value to find = null and replace with = 0

PBIDesktop_jMNtJiWoOb.png

View solution in original post

VahidDM
Super User
Super User

Hi @mm44 

 

You can create a new table with this DAX expression:

Table 2 = 
SUMMARIZE (
    'Table',
    'Table'[Item],
    'Table'[Warehouse],
    "Standard",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Standard" ) + 0,
    "Customer",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Customer" ) + 0,
    "Sales",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Sales" ) + 0
)

 

Output:

VahidDM_0-1656046763986.png



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 




View solution in original post

3 REPLIES 3
mm44
Frequent Visitor

I ended up going with @Seanan's suggestion as that seemed the most straight forward for a newbie like me.

 

I did do a test with @VH's input and it worked as well.

 

Thank you both for the quick responses!

VahidDM
Super User
Super User

Hi @mm44 

 

You can create a new table with this DAX expression:

Table 2 = 
SUMMARIZE (
    'Table',
    'Table'[Item],
    'Table'[Warehouse],
    "Standard",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Standard" ) + 0,
    "Customer",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Customer" ) + 0,
    "Sales",
        CALCULATE ( SUM ( 'Table'[Qty] ), 'Table'[Reorder Type] = "Sales" ) + 0
)

 

Output:

VahidDM_0-1656046763986.png



If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 




Seanan
Solution Supplier
Solution Supplier

Hi @mm44 

Under the Home tab in PBI Desktop click the transform data button. From here click on the Reorder tab so that it is hightlighted.

NVIDIA_Share_VDptifBRUo.png

 

 

 

In the transform tab click pivot column and set the value to TypeQty. Click advanced options and set the aggregate value function to Don't Aggregate. 

Your table will then appear as you want it.

6a9854d0-bb93-4543-a00d-0bf276d60617.png

NVIDIA_Share_fYhAWfA8Yb.png

*Update*

I forgot to mention, if you wish to replace the null values with 0.

Select all three columns, right click on one of them and click replace values. Value to find = null and replace with = 0

PBIDesktop_jMNtJiWoOb.png

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.