The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have two tables, Lead and Opportunity. I want to be able to calculate the sum of the Value in Opportunity if the OppId appears in Lead.
Effectively I want to show the value of the Opportunities that have originated from the Leads.
The Lead table would be similar to this;
LeadId | OppId |
1 | 9 |
2 | |
3 | 7 |
4 |
The Opportunity table similar to this;
OppId | Value |
9 | £100 |
8 | £300 |
7 | £50 |
6 | £200 |
The sum of all Opportunities is £650 but the desired result is the sum of OppId 9 and 7, therefore £150, as these are the only two opportunities that appear in the Lead table.
The Lead and Opportunity tables are joined to a common Date table, therefore there is no active relationship between Lead and Opportunity.
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |