Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello, I am trying to apply a filter on a table with values of another table column, I have tried this formula with no sucess :
Formula = sumx(CALCULATETABLE(Table1; Table1[Category] = DISTINCT(Table2[Cat])); Table1[Value])
My tables are :
Table 1
CategoryValue
| 1 | 5 |
| 2 | 10 |
| 3 | 15 |
| 4 | 20 |
| 5 | 25 |
Table 2
Cat
| 1 |
| 2 |
| 3 |
Solved! Go to Solution.
@armand453 Please try below measure.
First I created a table for unique categories. go to modeling tab and click on new table
Categories = VALUES('Table'[Category])
then create a measure
Measure =
VAR _selectedCategories = VALUES(Categories[Category])
RETURN CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Category] IN _selectedCategories))
Using category value from categories table in slicer and based on the selected values returning sum.
If it solved your purpose mark it as solved.
@armand453 Please try below measure.
First I created a table for unique categories. go to modeling tab and click on new table
Categories = VALUES('Table'[Category])
then create a measure
Measure =
VAR _selectedCategories = VALUES(Categories[Category])
RETURN CALCULATE(SUM('Table'[Value]),FILTER('Table','Table'[Category] IN _selectedCategories))
Using category value from categories table in slicer and based on the selected values returning sum.
If it solved your purpose mark it as solved.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 31 | |
| 19 | |
| 12 | |
| 10 |