cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Scotto13
Helper III
Helper III

2 Datasets - 1 Date Slicer - Relationship needed?

I have 2 datasets in my report 1)ChurnSignupsByDate and 2)ChurnDetails.  Both datasets have a field call SVC_END_DATE.  'ChurnSignupsByDate' has a single record for each SVC_END_DATE

'Churn' has all of the records for each Churn records with multiple records for each SVC_END_DATE.  

I want to display visualizations off of each dataset on the same report page with only one Date Slicer on this field SVC_END_DATE from ChurnSignupsByDate .  Do I have to create a relationship between these datasets?  When I tried this, I lost data in my ChurnDetails table. 

SRV_END_DATE Relationship.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

Can I please get help making this work? Any help is appreciated!

1 ACCEPTED SOLUTION

Be aware that when making this type of relationship you must always use on your visualization the column of the one side to get your results, further more when working with dates as a best practice the use of a date table is better because of the continuous dates.

 

 

Do you have a calendar table? 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

8 REPLIES 8
MFelix
Super User
Super User

Hi @Scotto13,

 

If your common value is a date you need to relate both tables based on a calendar table and then make a relationship between that table and the other two. However depending on how your model is setup you may need to create some additional dimension table to relate the tables in order to show the correct results. 

 

Can you share a sample data and expected result? 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



When I create the One to Many relationship, the records from the Details start at 3/9/2020 and forward.  I can't figure out why.  

You can see the left table has more records than the right.

Scotto13_0-1592861975986.png

Scotto13_1-1592862136661.png

 

I had the tables in the relationships backwards.  This is close but there are records in the Details table not being filtered by the selector.

Scotto13_0-1592862354259.png

 

As soon as I added a Date table I lost records in the Details table:

Date = Calendar( Date(2019, 1, 1), Date(2025,12,31))
The Details table has dates back to 1/1/2020 but with the join it will only show dates from 3/9/2020 forward
 
 

Scotto13_0-1592863163499.png

 

I figured it out.  One of my Dates has the time and the other just the date.  

Good solution to use the Date table @MFelix.  Thanks for you help!

Be aware that when making this type of relationship you must always use on your visualization the column of the one side to get your results, further more when working with dates as a best practice the use of a date table is better because of the continuous dates.

 

 

Do you have a calendar table? 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors