Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
How to use 2 different tables in filter expression?
Solved! Go to Solution.
Hi @MikhailGG ,
Here is my sample data:
You can use this DAX to create a calculated table in table Benchmark Categories
Dog_ID_Count =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[Value] >= 'Benchmark Categories'[Lower_Level] &&
'Table'[Value] <= 'Benchmark Categories'[Upper_Level]
)
)
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hi @MikhailGG ,
what filter context do you have for the needed measure? Or how do you plan to visualise the measure?
I have multiple categories in Benchmark Categories table,
| Category | Lower_Level | Upper_Level |
| 0-10 | 0 | 10 |
| 11-20 | 11 | 20 |
| 21-30 | 21 | 30 |
I want to create a measure that I would use to visualize count of dogs within those ranges. Y-axis is the measure. X-axis is the Count of Occurences. Table[Values] is the value that corresponds to each dog individualy, e.g. it's height in inches.
The chart's output is that 819 dogs are of the height between 0 and 10. 227 dogs are of the height between 11 and 20, and so on.
Hi @MikhailGG ,
Here is my sample data:
You can use this DAX to create a calculated table in table Benchmark Categories
Dog_ID_Count =
CALCULATE(
COUNTROWS('Table'),
FILTER(
'Table',
'Table'[Value] >= 'Benchmark Categories'[Lower_Level] &&
'Table'[Value] <= 'Benchmark Categories'[Upper_Level]
)
)
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.