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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
ChrisBr0
New Member

Join Based on 2 columns (User_Id and Date)

In PowerBI I have a table of activity log (userId, activity and date). Then I have a user list (userId and last_activity). I created relation between 2 tables with userId column. But I want to also create relation between dates. If I filter specific date range - I want activity logs from this date range and also ONLY users who were active in the specific date range. How to do it?

3 REPLIES 3
aditya0125
Resolver I
Resolver I

No need for Second Relation i think. Userid column relationship itself filters the Tables along with date column. if that doesn't work then create calendar by using calendar function and create relation between dates.

SamInogic
Super User
Super User

Hi @ChrisBr0 ,

 

As per our understandings you are looking for a relation between two tables so that you can see filter active user by Date (The users come in between selected date), 

 

You have already Created a Relation Between the userId now looking for with dates, 

 

I have crated sample tables your columns names:

Table 1.png

Table2.png

Now you looking for to see the Users in between a date range 

 

For this use a Slicer visual in Power BI report and Drag the Date Column,

Date Range.png

Now you can Filter users, 

filters.png

If we create another relation in same table we get an error as shown in below screenshot,


relationship.png
You don't need a Second Relation for date as Userid column relationship itself filters the Tables along with date column.

 

Please let me know if we are missing anything in your requirement and if possible you can provide sample pbix so that can check to provide answer for the same.

 

If this answer helps, please mark it as Accepted Solution so it would help others to find the solution.


Thanks!

Inogic Professional Service Division

An expert technical extension for your techno-functional business needs

Power Platform/Dynamics 365 CRM

Drop an email at crm@inogic.com

Service:  http://www.inogic.com/services/ 

Power Platform/Dynamics 365 CRM Tips and Tricks:  http://www.inogic.com/blog/

Inogic Professional Services: Power Platform/Dynamics 365 CRM
An expert technical extension for your techno-functional business needs
Service: https://www.inogic.com/services/
Tips and Tricks: https://www.inogic.com/blog/
rajulshah
Resident Rockstar
Resident Rockstar

@ChrisBr0 ,

 

You can create a Date table using CALENDAR DAX function and you can relate this date field with the one in the activitylog table. and you then need to plot date field from the date table in the slicer.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors