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
Gavin_Shales
Frequent Visitor

Counting dates from one table to another

Hi,

 

I have two tables, TableA contains a list of running unique dates and I want to connect this to tableB so that I can seperately count how many Complaints were received on that date, and how many were closed. It's very simple but I cannot find an answer to this.

 

Any help would be great.

 

Than you,

Gavin

1 ACCEPTED SOLUTION

I managed to figure this out by using Calculate and UseRelationship functions

 

I had to initally Link the two tables using a primary Link, then create a 2nd link and activate it in the Dax Formula.

 

Thanks for taking a look,

 

Regards

Gavin

View solution in original post

4 REPLIES 4
MFelix
Super User
Super User

Hi @Gavin_Shales,

 

On the Manage relationships create the connection between the two table by date, then just add the date in your table and the ID or other field in your complaint table to make the count.

 

create_r.png

 

Regards,

MFelix


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



Thank you for the reply, MFelix. I can only link the table on either the ReceivedDate or the ClosedDate in my complaints table. I want to be able to come up with a count of how many were Received and how many were Closed on a daily basis. Does your method acheive this?

Hi @Gavin_Shales,

 

You can make one active relationship and another one that is inactive then use the following measures:

Receveid = Count (Complaints[ID])

Closed = Calculate (Count (Complaints[ID]), USERRELATIONSHIP(Complaints[ClosedDate], Calendar[Date])

Then use this two measures inyour visuals.

 

 

Regards,

MFelix


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



I managed to figure this out by using Calculate and UseRelationship functions

 

I had to initally Link the two tables using a primary Link, then create a 2nd link and activate it in the Dax Formula.

 

Thanks for taking a look,

 

Regards

Gavin

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.