- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Get count of rows from another table
Hi.., I have two tables where I need to get the count of rows based on condition matches.
ie., Get count of rows From Table 2 where Table 1 [Date] = Table 2[Date] and Table 1[Name] = Table 2[Name].
Need a Calculated Column, since I required to see this column when extracting the report.
Note: Since I have indirect relationship, I was not able to create a direct relationship between two tables.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Beast ,
Based on your description, I have created a simple sampe:
Please try:
Column = COUNTROWS(FILTER('Table 2',[Date]=EARLIER(Table1[Date])&&[Name]=EARLIER(Table1[Name])))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi @Beast ,
Based on your description, I have created a simple sampe:
Please try:
Column = COUNTROWS(FILTER('Table 2',[Date]=EARLIER(Table1[Date])&&[Name]=EARLIER(Table1[Name])))
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

you can use relatedtaable() / related()/userelationship DAX functions to get that...
i guess related() or Relatedtable() will be use in this scenario. once you can try
if it is having relation then you can use crossfilter() DAX function

Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Power BI Monthly Update - February 2025
Check out the February 2025 Power BI update to learn about new features.

Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 08-18-2020 03:57 AM | ||
07-25-2024 06:03 AM | |||
12-03-2023 10:56 PM | |||
02-12-2024 04:52 AM | |||
02-13-2024 09:44 AM |
User | Count |
---|---|
84 | |
81 | |
52 | |
37 | |
36 |
User | Count |
---|---|
104 | |
85 | |
48 | |
43 | |
41 |