cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RSchaef Frequent Visitor
Frequent Visitor

Create a new table with columns from existing tables

Hi there, 

I am really new to Power BI and am excited about the opportunities with it.

 

I am doing somehting that seems simple, but I am struggling.

 

I work in the automotive industry.

 

I have one table (Sales Table) that has all the vehicles we have sold and one table that shows all the vehicles we have purchased and how they were purchased (Purchases Table).

 

Both tables are related by the vehicle VIN - 17 digits.

 

I want to make a new table that compares the VINs on the Sales table with the VINs on the Purchases Table and if the VIN on the Sales table is listed on the Purchases Table, I want a result of "Lead" and if the VIN on the Sales Table is not on the Purchases Table, then a result of NON LEAD.  

 

I then want to put LEAD and NON LEAD as a chicklet slicer to filter data.

 

Help please!

1 ACCEPTED SOLUTION

Accepted Solutions
stretcharm Senior Member
Senior Member

Re: Create a new table with columns from existing tables

There are several ways you could do this.

 

You can do it in query editor by createding a merge as new of the 2 tables.

A conditional formated expression would allow the LEAD/NON LEAD Status.

A chicklet or sliced would let you filter this merged table but not the other tables unless they are also joined.

 

I would probably join the 2 tables and add a new computed column on the Sales table to see if there is a match.

LeadStatus = if(ISBLANK(RELATED(Purchases[VIN])), "LEAD","NOT LEAD")

 

 

View solution in original post

2 REPLIES 2
stretcharm Senior Member
Senior Member

Re: Create a new table with columns from existing tables

There are several ways you could do this.

 

You can do it in query editor by createding a merge as new of the 2 tables.

A conditional formated expression would allow the LEAD/NON LEAD Status.

A chicklet or sliced would let you filter this merged table but not the other tables unless they are also joined.

 

I would probably join the 2 tables and add a new computed column on the Sales table to see if there is a match.

LeadStatus = if(ISBLANK(RELATED(Purchases[VIN])), "LEAD","NOT LEAD")

 

 

View solution in original post

RSchaef Frequent Visitor
Frequent Visitor

Re: Create a new table with columns from existing tables

Thank you!  Worked great

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors