Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
My one table is given in the format below
ID Age Height Score
1 20 167 120
2 30 150 122
3 40 190 100
Table 2 is
ID Condition
1 A
1 A
2 B
3 C
Now i have joined the two tables as one to many join (tab 1 to Tab 2) . In dashboard i want the filter (in addition to other filters) to be :
Drop downlist of - all selected originally
A
B
C
Measure_C = count(ID) = 3
Now filter out (unselect) condition A from table 2 , Measure_C now = 2 ( as ID 1 gets dropped )
How do i achieve this ? i have selected one-to-many join and apply filters both directions - but doesn't work. i want it to only apply on table 1. Note i need unselecting - not selecting i.e. if i click on A from drop down - measure = 1 ( as ID 1 is only counted ) . This is where i am currently. Appreciate your help.
Solved! Go to Solution.
Hi @pbhat89 ,
Do you want the result is the measure or the table?
If the measure is your result, please refer the following steps.
1. Change the Both direction to Single.
2. Then create a measure like this,
Measure =
var _selected = SELECTEDVALUE('Table 2'[Condition])
var _select_count = CALCULATE(COUNT('Table 1'[ID]),FILTER('Table 2','Table 2'[Condition]=_selected))
var _Total = COUNT('Table 1'[ID])
return
_Total - _select_count
If you have any question, please kindly ask here and we will try to resolve it.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi @pbhat89 ,
If you have to use the Table 1[ID], maybe you can try to change the relationship direction to Both.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
I understand the example given by me may not be really representative. So updating the example and sharing expected output of the table and a measure.
TABLE 1
Each row shows 1 ID only. ID does not repeat in TABLE 1
Measure : Count_of_unique_ID = 8
TABLE 2
Each row is a unique combination of ID and Condition. i.e. ID,condition won't repeat. The table may have <= IDs from table 1. E.g. it will not have a new ID 10 which has not occured in table 1.
The current join is in BOTH direction and via ID
FILTERS & MEASURE - EXPECTED OUTPUT.
FILTER 1 = AGE < 35
FILTER 2 = EXCLUDE (not filter on) IDs with CONDITION (A)
TABLE 1 after filters
Measure : Count_of_unique_ID = 4
Right now the filter 2 above - filters on i.e. selects the IDs where A happened where as i want to remove the IDs where A happened. and then update the measure Count_of_unique_ID
Hope the query is clear now?
Hi @pbhat89 ,
Do you want the result is the measure or the table?
If the measure is your result, please refer the following steps.
1. Change the Both direction to Single.
2. Then create a measure like this,
Measure =
var _selected = SELECTEDVALUE('Table 2'[Condition])
var _select_count = CALCULATE(COUNT('Table 1'[ID]),FILTER('Table 2','Table 2'[Condition]=_selected))
var _Total = COUNT('Table 1'[ID])
return
_Total - _select_count
If you have any question, please kindly ask here and we will try to resolve it.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
In the above -
solution works but only for one condition. If i select two conditions i.e. A and B . then it doesn't work and reverts to the old count.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Table 1 is actually the main table for me to do the counts.
For e.g. my filters are :
Age < 35
measure_C = 2 ( ID 1 , 2)
filter out (unselect) condition A
measure_C= 1 ( ID 2 )
Basically i want to filter to work oppsite i.e. when i select the conditions from a list , it should remove the corresponding IDs from the main table. As a default it should have everything to start.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Understand your approach and makes sense. I was able to create a slicer first with below :
Now for the measure : i believe the selected value should be on the slicer - since i will select the ones i want to be filtered out in table 2 i.e. condition ? And "NOT IN" is not working in DAX. What is the correct approach for creating this measure ? Below my attempt which gives error on NOT IN
Filter_condition = IF(SELECTEDVALUE(Disclosure[Condition]) NOT IN Values(Table2[Condition]), "Yes", "No")
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 55 | |
| 48 | |
| 37 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 85 | |
| 70 | |
| 38 | |
| 28 | |
| 25 |