cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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

Accepted Solutions
Highlighted
Frequent Visitor

Re: Counting dates from one table to another

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
Highlighted
Super User III
Super User III

Re: Counting dates from one table to another

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





Highlighted
Frequent Visitor

Re: Counting dates from one table to another

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?

Highlighted
Frequent Visitor

Re: Counting dates from one table to another

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

Highlighted
Super User III
Super User III

Re: Counting dates from one table to another

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





Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors