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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Relationship between 2 tables with a Date Table and creating link between the two data tables.

I have two tables and am using a date table to create my measures but need to be able to cross interact between the two main data tables.  I have one Product table that shows the Start-up Date for each product model.  My second table shows when each product/product model had a revision.  There can be multiple revisions for one product.  My main goal is to create a Calcualtion of the **bleep** products by start up date divided by a rolling 12 months on the product revisions.  My calculations seem to work but I need to be able to add a legend for the products and/or a slicer for the products but since the two data tables are only connected to the date table, they don't interact with each other and I can't add the product field to the visual.  I don't know how to fix this either in my measures or in my data model.  Here are my measures:

1) SumCount = Count(Products[Start Up Date])
2) CumProductCount =Var _curcount = MAX('Date'[Date])
Var _t = FILTER(ALLSELECTED(Products), Products[Start Up Date] <= _curcount)
Return
SUMX(_t,[SumCount2])
3) RevisionCountR12 =
var Maxdate = MAX('Date'[Date])
Return
CALCULATE(
    COUNT('Product Revisions'[Revision Date]),
    FILTER(ALL('Date'),
        AND(Date'[Date] <= Maxdate,
       DATEADD('Date'[Date],1, YEAR) > Maxdate )))
4) MTBC = DIVIDE([CumProductCount], [RevisionCountR12))
Here is the data below:
IDProductStart Up DateModel
63E7/7/2012E63
64E7/7/1996E64
65E7/7/2019E65
66E7/7/2017E66
67E9/7/1954E67
68E8/15/1971E68
69E8/15/1971E69
70E8/15/1971E70
71E8/15/2000E71
72E8/15/1980E72
73E8/15/1971E73
74E8/7/1994E74
75E4/29/1996E75
76E7/7/2012E76
113N7/7/2005N113
114N1/7/1997N114
115N4/7/2019N115
116N1/7/1997N116
117N3/8/2013N117
118N7/7/2020N118
119N3/8/2013N119
120N3/8/2013N120
121N3/8/2013N121
122N3/8/2012N122
123N7/7/1992N123
124N3/8/2013N124
126N3/8/2013N126
272E9/7/1954E272
273E8/15/1971E273
333O3/8/2018O333
334O3/8/2018O334
335O3/8/2018O335
336O9/7/2020O336
337O3/8/2017O337
338O3/8/2020O338

 

IDProductRevision DateModel
75E4/15/2006E75
64E7/7/2012E64
74E8/7/2012E74
75E7/7/2014E75
64E7/7/2016E64
68E10/22/2017E68
70E10/22/2017E70
69E10/22/2017E69
74E9/7/2018E74
63E7/7/2019E63
64E7/7/2020E64
75E7/7/2020E75
65E8/2/2020E65
69E5/16/2021E69
67E2/14/2023E67
272E2/14/2023E272
74E9/7/2023E74
123N1/8/2010N123
117N10/15/2018N117
114N3/8/2020N114
117N9/14/2020N117
126N4/23/2022N126
126N9/14/2022N126
334O7/25/2019O334
333O3/12/2020O333
334O12/13/2020O334

 

2 REPLIES 2
Sahir_Maharaj
Super User
Super User

Hello @Anonymous,

 

To resolve this challenge, consider the following steps:

 

1. Create a direct relationship between the Product table and the Product Revisions table based on a shared key. This would likely be the Model or ID column.

2. If required, modify your measures to leverage the direct relationship to make sure they calculate as expected.

3. Adjust the visual interactions if necessary. If you have a slicer on the Product/Model and you want it to impact both tables (hence all visuals based on them), the direct relationship will facilitate this. Make sure the slicer is set to "Single" select or ensure your measures handle multi-selection appropriately.

 

Should you require my further assistance, please do not hesitate to reach out to me.


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning
Anonymous
Not applicable

So which relationship would be active and which would not.  I can easily connect the two data tables by the ID.  I assume this one would be active and I would have a dotted line between one of my data tables and the date table?  

clarkbj71_0-1697481303308.png

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors