<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Attempting to create filter off of measure value in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841760#M184850</link>
    <description>&lt;P&gt;I solved it by creating a measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PPVisits = CALCULATE(Count(VisitsPerProvider[VID]),VisitsPerProvider[ProviderID] = SELECTEDVALUE(ProviderFacilities[ID]))&lt;/LI-CODE&gt;</description>
    <pubDate>Fri, 03 Oct 2025 14:53:18 GMT</pubDate>
    <dc:creator>Thomas_MedOne</dc:creator>
    <dc:date>2025-10-03T14:53:18Z</dc:date>
    <item>
      <title>Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4840902#M184820</link>
      <description>&lt;P&gt;I'm finding a lot of things out there on this topic but nothing specifically for what I'm looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have two tables (three actually).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Admissions table&lt;/P&gt;&lt;P&gt;2. Provider Visits table&lt;/P&gt;&lt;P&gt;3. Provider Facilities table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using facility name from Table 3 and the count from table 2.&amp;nbsp; But the relationship is apparently using the one routed through admissions to get the values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, my solution would be that I created a measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CurrentProvider = SELECTEDVALUE(ProviderFacilities[ID])&lt;/LI-CODE&gt;&lt;P&gt;And my card shows the ID.&lt;/P&gt;&lt;P&gt;Now, I want to put a fitler on the bar graph that says if the VisitsPerProvider[ProviderID] equals the [CurrentProvider] then we're good.&amp;nbsp; I tried a measure and that didn't work. I tried a column in the VisitsPerProvider Table:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;isPartOfFilter = If (VisitsPerProvider[ProviderID] = [CurrentProvider],1,0)&lt;/LI-CODE&gt;&lt;P&gt;but every value is 0 because it doesn't recognize the measure.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know how to get this value to match so I can filter on it.&amp;nbsp; What are the ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 20:57:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4840902#M184820</guid>
      <dc:creator>Thomas_MedOne</dc:creator>
      <dc:date>2025-10-02T20:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4840926#M184821</link>
      <description>&lt;P&gt;You cannot measure a measure directly. Either materialize it first, or create a separate measure that implements the entire business logic.&lt;/P&gt;</description>
      <pubDate>Thu, 02 Oct 2025 21:47:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4840926#M184821</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2025-10-02T21:47:32Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841628#M184842</link>
      <description>&lt;P&gt;Are you suggesting I do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;isPartOfFilter = If (VisitsPerProvider[ProviderID] = SELECTEDVALUE(ProviderFacilities[ID]),1,0)&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Oct 2025 12:54:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841628#M184842</guid>
      <dc:creator>Thomas_MedOne</dc:creator>
      <dc:date>2025-10-03T12:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841735#M184847</link>
      <description>&lt;P&gt;I just tried this and it didn't work.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 14:25:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841735#M184847</guid>
      <dc:creator>Thomas_MedOne</dc:creator>
      <dc:date>2025-10-03T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841737#M184848</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="361835" data-lia-user-login="Thomas_MedOne" class="lia-mention lia-mention-user"&gt;Thomas_MedOne&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;H3&gt;&amp;nbsp;&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Keep your existing measure that captures the selected provider:&lt;PRE&gt;CurrentProvider = SELECTEDVALUE(ProviderFacilities[ID])&lt;/PRE&gt;&lt;SPAN&gt;Ref: &lt;A href="https://learn.microsoft.com/en-us/dax/selectedvalue-function-dax" target="_self"&gt;SELECTEDVALUE&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Create a Visits measure (if you don’t already have one):&lt;PRE&gt;Visits = COUNTROWS(VisitsPerProvider)&lt;/PRE&gt;&lt;/LI&gt;&lt;LI&gt;Create a “filtered” version of that Visits measure that applies the selected provider via TREATAS:&lt;PRE&gt;Visits (Selected Provider) =
VAR prov = [CurrentProvider]
RETURN
CALCULATE(
    [Visits],
    TREATAS( { prov }, VisitsPerProvider[ProviderID] )  -- force the provider filter here
)&lt;/PRE&gt;&lt;SPAN&gt;Ref: &lt;A href="https://learn.microsoft.com/en-us/dax/treatas-function-dax" target="_self"&gt;TREATAS&lt;/A&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;Use &lt;STRONG&gt;Visits (Selected Provider)&lt;/STRONG&gt; on your bar chart instead of the unfiltered Visits measure.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;If you found this helpful, consider giving some Kudos. If I answered your question or solved your problem, mark this post as the solution.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Oct 2025 14:29:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841737#M184848</guid>
      <dc:creator>tayloramy</dc:creator>
      <dc:date>2025-10-03T14:29:55Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841760#M184850</link>
      <description>&lt;P&gt;I solved it by creating a measure:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;PPVisits = CALCULATE(Count(VisitsPerProvider[VID]),VisitsPerProvider[ProviderID] = SELECTEDVALUE(ProviderFacilities[ID]))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 03 Oct 2025 14:53:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4841760#M184850</guid>
      <dc:creator>Thomas_MedOne</dc:creator>
      <dc:date>2025-10-03T14:53:18Z</dc:date>
    </item>
    <item>
      <title>Re: Attempting to create filter off of measure value</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4849927#M185101</link>
      <description>&lt;P&gt;For filtering through measures, I'd recommend this:&amp;nbsp;&lt;A href="https://youtu.be/Ss5L7jXIhso?si=N8SryHbKwsyS_lzw" target="_blank"&gt;https://youtu.be/Ss5L7jXIhso?si=N8SryHbKwsyS_lzw&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Oct 2025 13:39:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Attempting-to-create-filter-off-of-measure-value/m-p/4849927#M185101</guid>
      <dc:creator>theov</dc:creator>
      <dc:date>2025-10-14T13:39:33Z</dc:date>
    </item>
  </channel>
</rss>

