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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I'm finding a lot of things out there on this topic but nothing specifically for what I'm looking for.
I have two tables (three actually).
1. Admissions table
2. Provider Visits table
3. Provider Facilities table.
I have relationships between these tables all of them are many to many because of the way the data is going. I have a visual for the count of visit a provider had on a given day.
I'm using facility name from Table 3 and the count from table 2. But the relationship is apparently using the one routed through admissions to get the values.
What is happening is there are two providers going to this facility. When I choose the provider in the slider, it give me ALL visits calculated for both providers not just the provider whose building it is.
So, my solution would be that I created a measure:
CurrentProvider = SELECTEDVALUE(ProviderFacilities[ID])And my card shows the ID.
Now, I want to put a fitler on the bar graph that says if the VisitsPerProvider[ProviderID] equals the [CurrentProvider] then we're good. I tried a measure and that didn't work. I tried a column in the VisitsPerProvider Table:
isPartOfFilter = If (VisitsPerProvider[ProviderID] = [CurrentProvider],1,0)but every value is 0 because it doesn't recognize the measure.
I don't know how to get this value to match so I can filter on it. What are the ideas?
Solved! Go to Solution.
Hi @Thomas_MedOne,
Youโre running into two classic issues at once: (1) ambiguous filter paths from many-to-many relationships, and (2) trying to use a measure inside a calculated column (columns are computed at refresh time and canโt โseeโ slicer/visual context). The fix is to drive the visual with a measure that explicitly applies the selected ProviderID to your Visits table.
CurrentProvider = SELECTEDVALUE(ProviderFacilities[ID])Ref: SELECTEDVALUE
Visits = COUNTROWS(VisitsPerProvider)
Visits (Selected Provider) =
VAR prov = [CurrentProvider]
RETURN
CALCULATE(
[Visits],
TREATAS( { prov }, VisitsPerProvider[ProviderID] ) -- force the provider filter here
)Ref: TREATAS
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.
Are you suggesting I do this?
isPartOfFilter = If (VisitsPerProvider[ProviderID] = SELECTEDVALUE(ProviderFacilities[ID]),1,0)
I just tried this and it didn't work.
Hi @Thomas_MedOne,
Youโre running into two classic issues at once: (1) ambiguous filter paths from many-to-many relationships, and (2) trying to use a measure inside a calculated column (columns are computed at refresh time and canโt โseeโ slicer/visual context). The fix is to drive the visual with a measure that explicitly applies the selected ProviderID to your Visits table.
CurrentProvider = SELECTEDVALUE(ProviderFacilities[ID])Ref: SELECTEDVALUE
Visits = COUNTROWS(VisitsPerProvider)
Visits (Selected Provider) =
VAR prov = [CurrentProvider]
RETURN
CALCULATE(
[Visits],
TREATAS( { prov }, VisitsPerProvider[ProviderID] ) -- force the provider filter here
)Ref: TREATAS
If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.
I solved it by creating a measure:
PPVisits = CALCULATE(Count(VisitsPerProvider[VID]),VisitsPerProvider[ProviderID] = SELECTEDVALUE(ProviderFacilities[ID]))
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 5 | |
| 5 |