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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PaulCo
Helper II
Helper II

Trouble Creating Relationships 2

I recently posted a question about creating releationships with multiple relationships. Trouble Creating Relationships 

 

Thanks to the people that helped, I was able to rearrange my data in a more efficient way.

 

However, I wasn't able to slice the data how I needed to due to duplicates in one of the tables.

 

Below I'll restate the problem with a new dataset to see if anyone is able to help.

 

I have 2 tables of data. One is a report from SFDC which shows upcoming bookings and the other is a table created in excel which shows the plan numbers for the next 2 quarters. I would like to create a relationship or merge these 2 tables so that I can slice the data by Opportunity Type, Region and Period so that I can compare the Plan number to the Bookings number.

 

For example if I have 2 'Cards', one showing total booking number and one showing total plan number, and I create a slicer for period and select 2017-Q1, then only the Q1 data totals will be shown for each. 

 

Here are my 2 tables:

 

Bookings Plan    
Opportunity Record TypeMonthRegionPeriodPlan Amount
X10/1/2016EMEAQ1-2017300
X11/1/2016EMEAQ1-2017400
X12/1/2016EMEAQ1-20171000
X1/1/2016EMEAQ2-2017300
X2/1/2016EMEAQ2-2017200
X3/1/2016EMEAQ2-20171200
Y10/1/2016EMEAQ1-2017100
Y11/1/2016EMEAQ1-2017100
Y12/1/2016EMEAQ1-2017800
Y1/1/2016EMEAQ2-2017300
Y2/1/2016EMEAQ2-2017400
Y3/1/2016EMEAQ2-20171000
X10/1/2016North AmericaQ1-2017500
X11/1/2016North AmericaQ1-2017600
X12/1/2016North AmericaQ1-20171200
X1/1/2016North AmericaQ2-2017500
X2/1/2016North AmericaQ2-2017400
X3/1/2016North AmericaQ2-20171400
Y10/1/2016North AmericaQ1-2017300
Y11/1/2016North AmericaQ1-2017300
Y12/1/2016North AmericaQ1-20171000
Y1/1/2016North AmericaQ2-2017500
Y2/1/2016North AmericaQ2-2017600
Y3/1/2016North AmericaQ2-20171200

 

SFDC      
Opportunity NameAccount NameOpportunity Record TypeMonthPeriodRegionAmount
Opportunity ACompany AX2/1/2016Q2-2017EMEA400
Opportunity BCompany AY3/1/2016Q2-2017EMEA600
Opportunity CCompany CX10/1/2016Q1-2017EMEA700
Opportunity DCompany CX11/1/2016Q1-2017EMEA100
Opportunity ECompany CY1/1/2016Q2-2017EMEA1000
Opportunity FCompany CY2/1/2016Q2-2017North America200
Opportunity GCompany AX3/1/2016Q2-2017North America300
Opportunity HCompany CX10/1/2016Q1-2017North America800
Opportunity ICompany CX12/1/2016Q1-2017North America900
Opportunity JCompany AY1/1/2016Q2-2017North America900
Opportunity KCompany BY2/1/2016Q2-2017North America300
Opportunity LCompany BX1/1/2016Q2-2017EMEA200
Opportunity MCompany BX2/1/2016Q2-2017EMEA100
Opportunity NCompany AY3/1/2016Q2-2017North America800
Opportunity OCompany BX10/1/2016Q1-2017EMEA700

 

When I tried to use the previous solution I was getting repeats of the plan numbers as they were showing for each period on the SFDC numbers.

 

The plan numbers have one record for each Opportunity type for each period for each region. The SFDC table can have any number of records for each field.

 

All help is greatly appreciated.

 

Thanks

Paul 

1 ACCEPTED SOLUTION
CahabaData
Memorable Member
Memorable Member

It appears to me that you need to create a stand alone reference table; the combination of [month & region] appears to be the viable value.

 

Create this combination column in both tables.

 

Then create a new reference table that is the Distinct list of the Combination.  It must contain all without duplicates.  If neither table contains all then you need to append them together into a single column before creating the Distinct.  Or it maybe easier just create the table manually rather than derive it from your existing tables - whichever is a more efficient method - and whether this table is to grow automatically over time as the data is refreshed.

 

Then the reference table is a single column table.  Join it to the two tables using the new combination fields. 

 

You should then be able to report & filter on these 2 tables together.

 

www.CahabaData.com

View solution in original post

2 REPLIES 2
CahabaData
Memorable Member
Memorable Member

It appears to me that you need to create a stand alone reference table; the combination of [month & region] appears to be the viable value.

 

Create this combination column in both tables.

 

Then create a new reference table that is the Distinct list of the Combination.  It must contain all without duplicates.  If neither table contains all then you need to append them together into a single column before creating the Distinct.  Or it maybe easier just create the table manually rather than derive it from your existing tables - whichever is a more efficient method - and whether this table is to grow automatically over time as the data is refreshed.

 

Then the reference table is a single column table.  Join it to the two tables using the new combination fields. 

 

You should then be able to report & filter on these 2 tables together.

 

www.CahabaData.com

This worked perfectly

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors