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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
zirloko
Frequent Visitor

Merge data from two columns into one

Background: Our transactions are booked using either project codes or cost center (CC) (not both). Ultimately the project codes roll to specific CC. So I want to be able to show a total spend by CC regardless of it's project or CC based. The best I can do with a measure is to show results booked directly to a CC, and the next column over show results with a derived CC from the project. How can I get it into one?

 

The best I can do is this result. How can I get this back in one CC column? The 75 and 225 represents the spend directly to projects, but I'd like the derived CC to be in-line with the CC. 

 

 
CCAmountDerived CC
 754707
 2254708
4707100 
470835 
470940 
 475 

 

My sample dataset:

 

Date           Account   CC              Project              Amount  Text 

1/1/20196428014707 100Entry 1 of 7
1/15/2019642901 DD-4-11-000650Entry 2 of 7
1/25/2019642703 DD-4-01-001825Entry 3 of 7
2/1/20196433034708 35Entry 4 of 7
3/5/20196437014709 40Entry 5 of 7
3/15/2019642801 MG-4-01-0001-01150Entry 6 of 7
3/31/2019642801 MG-4-01-0001-01-0175Entry 7 of 7

                                                                                 475

Mapping of projects to CC. Then this table is linked to my cost center look-up table on the CC number column.

 

Dimension         Project Number    Description                         CC

Project               DD-4-01X1                                    4707
Project               DD-4-02X2 4707
Project              MG-4-01X3 4708

 

Thanks!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

In the query editor try adding a conditional column. In the dialog, IF CC > 0 Then CC Else Select a Column -> Derived CC

View solution in original post

1 REPLY 1
Anonymous
Not applicable

In the query editor try adding a conditional column. In the dialog, IF CC > 0 Then CC Else Select a Column -> Derived CC

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

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.