I am trying to filter one table based on another, where the value(s) I am trying to filter on are pivoted. I have the AllPatients table that is filtering properly and has separate slicers for each of the conditions. That table 1` looks like this:
I am trying to filter another table, All_Metrics_patient_pivot that is pivoted on the conditions and looks like this:
I have tried a number of ways to filter the pivoted table based on the condition filters, and nothing is working. How would I go about this? If either will help, in the process of trying various things I have a metric that gives me a comma-delimited string of selected conditions (e.g., "CHF", "Diabetes", "HLD") and a table that is one column containing a list of the conditions that will filter the All_Metrics_patient_pivot table, but I haven't been able to filter that by the slicers either. I'm starting to suspect my approach is wrong, and maybe the answer is in PowerQuery and not using measures? Any help would be appreciated.
Additional information requested: Here is a sample of the dashboard I am building. The top and left visuals use the AllPatients table, with the top showing how many patients have each count of conditions (i.e., patients with 5-6 conditions are likely to have more issues than patients with just 1 condition) and the left showing a count of how many patients have each condition. The metrics visual on the right is what I'm having trouble with. It uses the All_Metrics_patient_pivot table to count how many patients with each condition are in the red, yellow, and green categories of each metric. The top and left currently filter correctly with the filter I am using, while the right does not filter at all.
I should also add that each condition has its own toggle switch.



Try the following: