<?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: Filter by another column in a measure in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903739#M8367</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp; for the quick response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although your solution worked, I think I over-simplified my sample data. In reality, Financials is my fact table and I have several dimension tables associated to it in a star schema structure. In my sample, imagine a OrgMaster and ShadowOrgMaster table exists along with maybe few other dimension tables.&lt;/P&gt;&lt;P&gt;I do not want to remove all the filters from the Financial FACT table, only want to remove any filters from the OrgMaster table when calculating the Shadow Revenue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So something like this wouldn't work giving a syntax error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Shadow Revenue = CALCULATE([Revenue],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;FILTER(ALL(OrgMaster),ShadowOrgMaster[ShadowOrg]=SELECTEDVALUE(OrgMaster[Org]))&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jan 2020 19:27:52 GMT</pubDate>
    <dc:creator>vickyd</dc:creator>
    <dc:date>2020-01-17T19:27:52Z</dc:date>
    <item>
      <title>Filter by another column in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903707#M8363</link>
      <description>&lt;P&gt;The sample data below is kind of a representation of my data in it's simplest form.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Org&lt;/TD&gt;&lt;TD&gt;Amount&lt;/TD&gt;&lt;TD&gt;Amount Type&lt;/TD&gt;&lt;TD&gt;ShadowOrg&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;20&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD&gt;10&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;Revenue&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD&gt;15&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;X&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Y&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Z&lt;/TD&gt;&lt;TD&gt;4&lt;/TD&gt;&lt;TD&gt;Cost&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I mainly have 3 metrics I'm trying to get from it. The first 2, &lt;STRONG&gt;Revenue&lt;/STRONG&gt; and &lt;STRONG&gt;Cost&lt;/STRONG&gt; are straightfoward.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Revenue = CALCULATE(SUM(Financials[Amount]), Financials[Amount Type] = "Revenue")&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Cost = CALCULATE(SUM(Financials[Amount]), Financials[Amount Type] = "Cost")&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;For &lt;STRONG&gt;Shadow Revenue&lt;/STRONG&gt;, I want to be able to show the revenue based on the field ShadowOrg but I want to show it in a table that has the Org as one of the columns.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Here's what I've set it up as but it doesn't work.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Shadow Revenue = CALCULATE([Revenue], ALL(Financials[Org]), FILTER(VALUES(Financials[ShadowOrg]), Financials[ShadowOrg] = SELECTEDVALUE(Financials[Org])))&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;img /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I expect to see the following values in the Shadow Revenue Column&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;X = 10&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Y = 20&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Z = 30&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;What am I doing wrong?&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 18:28:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903707#M8363</guid>
      <dc:creator>vickyd</dc:creator>
      <dc:date>2020-01-17T18:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by another column in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903711#M8364</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="732" data-lia-user-login="vickyd" class="lia-mention lia-mention-user"&gt;vickyd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try a measure&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Shadow Revenue = CALCULATE([Revenue],
FILTER(ALL(Financials),Financials[ShadowOrg]=SELECTEDVALUE(Financials[Org]))
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#ababab"&gt;do not hesitate to give a kudo to useful posts and mark solutions as solution&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 18:36:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903711#M8364</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-01-17T18:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by another column in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903739#M8367</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp; for the quick response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Although your solution worked, I think I over-simplified my sample data. In reality, Financials is my fact table and I have several dimension tables associated to it in a star schema structure. In my sample, imagine a OrgMaster and ShadowOrgMaster table exists along with maybe few other dimension tables.&lt;/P&gt;&lt;P&gt;I do not want to remove all the filters from the Financial FACT table, only want to remove any filters from the OrgMaster table when calculating the Shadow Revenue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So something like this wouldn't work giving a syntax error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;Shadow Revenue = CALCULATE([Revenue],&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;FILTER(ALL(OrgMaster),ShadowOrgMaster[ShadowOrg]=SELECTEDVALUE(OrgMaster[Org]))&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 19:27:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903739#M8367</guid>
      <dc:creator>vickyd</dc:creator>
      <dc:date>2020-01-17T19:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by another column in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903765#M8369</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="732" data-lia-user-login="vickyd" class="lia-mention lia-mention-user"&gt;vickyd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; you are trying to add a measure into&amp;nbsp;&lt;EM&gt;ShadowOrgMaster &lt;/EM&gt;it should look like&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Shadow Revenue = CALCULATE([Revenue],
FILTER(ALL(OrgMaster),OrgMaster[ShadowOrg]=SELECTEDVALUE(ShadowOrgMaster[Org]))
)&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#ababab"&gt;do not hesitate to give a kudo to useful posts and mark solutions as solution&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 19:57:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903765#M8369</guid>
      <dc:creator>az38</dc:creator>
      <dc:date>2020-01-17T19:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Filter by another column in a measure</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903844#M8372</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="82403" data-lia-user-login="az38" class="lia-mention lia-mention-user"&gt;az38&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="732" data-lia-user-login="vickyd" class="lia-mention lia-mention-user"&gt;vickyd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if&amp;nbsp; you are trying to add a measure into&amp;nbsp;&lt;EM&gt;ShadowOrgMaster &lt;/EM&gt;it should look like&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Shadow Revenue = CALCULATE([Revenue],
FILTER(ALL(OrgMaster),OrgMaster[ShadowOrg]=SELECTEDVALUE(ShadowOrgMaster[Org]))
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;I&gt;&lt;FONT color="#ababab"&gt;do not hesitate to give a kudo to useful posts and mark solutions as solution&lt;/FONT&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;OrgMaster will not have ShadowOrg column and ShadowOrgMaster will not have the Org column.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;OrgMaster will have Org and say OrgName and ShadowOrgMaster will have ShadowOrg and ShadowOrgName.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not seeing an attach file option here and have restrictions for file sharing at work else would have shared the PBIX file. Will try to share once I'm home.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jan 2020 22:09:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Filter-by-another-column-in-a-measure/m-p/903844#M8372</guid>
      <dc:creator>vickyd</dc:creator>
      <dc:date>2020-01-17T22:09:38Z</dc:date>
    </item>
  </channel>
</rss>

