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

Make calculation of two columns form different tables

Hi,

I have this view

 Capture.JPG

 

I want to make calculation Con/Leads

Con and Leads are from different tables, so to add cal column in one table is not working.

Is it possible to add calcualtion to this can of view?

Thanks!

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-ljerr-msft
Microsoft

Re: Make calculation of two columns form different tables

Hi @DavidSSAA,

 

According to your description above, you can just use the formula below to create a new measure(no matter in what table) as austinsense suggested above in this case. Both Con and Leads columns should be recognized and it should work.

Con/Leads = DIVIDE ( SUM ( Table1[Con] ), SUM ( Table2[Leads] ) )

If you still have any issue with creating the measure, could you post all your table structures and the measures you have tried using? It is better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.Smiley Happy

 

Regards

View solution in original post

9 REPLIES 9
austinsense Established Member
Established Member

Re: Make calculation of two columns form different tables

Does this work?

 

Con/Leads = DIVIDE( SUM(Con), SUM(Leads) )
Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂
DavidSSAA Frequent Visitor
Frequent Visitor

Re: Make calculation of two columns form different tables

Nope ..

Where I should put this calcualtion ?

if i put it in one table he can recognize the other field

austinsense Established Member
Established Member

Re: Make calculation of two columns form different tables

Ok so this a BIG difference in PowerBI/PowerPivot vs regular Excel - we don't add a column to the dataset.  That's called a calculated column.  We want to create a measure.  A measure doesn't exist in this table or that table - it exists when we try to use it in a report and it can access any table in your model.

 

I'm pretty excited for you to discover this concept - it's going to change your life. 🙂

Austin is VP Operations at PowerPivotPro and a professional self-service enthusiast 🙂
Highlighted
DavidSSAA Frequent Visitor
Frequent Visitor

Re: Make calculation of two columns form different tables

Sorry for the numb question

where in the power bi i make this calulation?

because when i press the new measure button i get a new column in my table

DavidSSAA Frequent Visitor
Frequent Visitor

Re: Make calculation of two columns form different tables

Sorry for the numb question

where in the power bi i make this calulation?

because when i press the new measure button i get a new column in my table

Microsoft v-ljerr-msft
Microsoft

Re: Make calculation of two columns form different tables

Hi @DavidSSAA,

 

To create a measure in Power BI Desktop, you can right click, or click the down arrow on the table in the field list, and then click New Measure.

 

You can also create a new measure by clicking on the New Measure button in the ribbon on Power BI Desktop’s Home tab.

 

For more details about Measures and how to create it in Power BI, you can refer to the following articles.Smiley Happy

Measures in Power BI Desktop

Create your own measures in Power BI Desktop

 

Regards

DavidSSAA Frequent Visitor
Frequent Visitor

Re: Make calculation of two columns form different tables

@v-ljerr-msft

Thanks for the reply.

I already know how to make a cal in PBI.

Here the situation is different, Date, Leads and Con are from different tables that have key date.

So if I add Cal it need to be in specific table (not in chart for exmaple) if i make the measure in date table PBI is not familer with Con and Leads. If I make the measure in Leads PBI is not familer with Con and so on.

 

If i could make the measure per chart it will solve my problem - is it possible?

Or if i could make a new table that joins all the other table it will work as well I believe.

Is one of the option possible?

 

Thanks for any help

Microsoft v-ljerr-msft
Microsoft

Re: Make calculation of two columns form different tables

Hi @DavidSSAA,

 

According to your description above, you can just use the formula below to create a new measure(no matter in what table) as austinsense suggested above in this case. Both Con and Leads columns should be recognized and it should work.

Con/Leads = DIVIDE ( SUM ( Table1[Con] ), SUM ( Table2[Leads] ) )

If you still have any issue with creating the measure, could you post all your table structures and the measures you have tried using? It is better to share a sample pbix file. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.Smiley Happy

 

Regards

View solution in original post

DavidSSAA Frequent Visitor
Frequent Visitor

Re: Make calculation of two columns form different tables

Thanks 🙂

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (4,542)