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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.